Skip to content

Commit 86ee773

Browse files
committed
add to ci.
1 parent ffb974f commit 86ee773

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/nightly_tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,60 @@ jobs:
525525
pip install slack_sdk tabulate
526526
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
527527
528+
run_nightly_pipeline_level_quantization_tests:
529+
name: Torch quantization nightly tests
530+
strategy:
531+
fail-fast: false
532+
max-parallel: 2
533+
runs-on:
534+
group: aws-g6e-xlarge-plus
535+
container:
536+
image: diffusers/diffusers-pytorch-cuda
537+
options: --shm-size "20gb" --ipc host --gpus 0
538+
steps:
539+
- name: Checkout diffusers
540+
uses: actions/checkout@v3
541+
with:
542+
fetch-depth: 2
543+
- name: NVIDIA-SMI
544+
run: nvidia-smi
545+
- name: Install dependencies
546+
run: |
547+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
548+
python -m uv pip install -e [quality,test]
549+
python -m uv pip install -U bitsandbytes optimum_quanto
550+
python -m uv pip install pytest-reportlog
551+
- name: Environment
552+
run: |
553+
python utils/print_env.py
554+
- name: Pipeline-level quantization tests on GPU
555+
env:
556+
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
557+
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
558+
CUBLAS_WORKSPACE_CONFIG: :16:8
559+
BIG_GPU_MEMORY: 40
560+
run: |
561+
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
562+
--make-reports=tests_pipeline_level_quant_torch_cuda \
563+
--report-log=tests_pipeline_level_quant_torch_cuda.log \
564+
tests/quantization/test_pipeline_level_quantization.py
565+
- name: Failure short reports
566+
if: ${{ failure() }}
567+
run: |
568+
cat reports/tests_pipeline_level_quant_torch_cuda_stats.txt
569+
cat reports/tests_pipeline_level_quant_torch_cuda_failures_short.txt
570+
- name: Test suite reports artifacts
571+
if: ${{ always() }}
572+
uses: actions/upload-artifact@v4
573+
with:
574+
name: torch_cuda_pipeline_level_quant_reports
575+
path: reports
576+
- name: Generate Report and Notify Channel
577+
if: always()
578+
run: |
579+
pip install slack_sdk tabulate
580+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
581+
528582
# M1 runner currently not well supported
529583
# TODO: (Dhruv) add these back when we setup better testing for Apple Silicon
530584
# run_nightly_tests_apple_m1:

0 commit comments

Comments
 (0)