@@ -347,6 +347,66 @@ jobs:
347347        pip install slack_sdk tabulate 
348348        python utils/log_reports.py >> $GITHUB_STEP_SUMMARY 
349349
350+ run_nightly_quantization_tests :
351+     name : Torch quantization nightly tests 
352+     strategy :
353+       fail-fast : false 
354+       max-parallel : 2 
355+       matrix : 
356+         config :
357+           - backend : " bitandbytes" 
358+             test_location : " bnb" 
359+     runs-on :
360+       group : aws-g6e-xlarge-plus 
361+     container :
362+       image : diffusers/diffusers-pytorch-cuda 
363+       options : --shm-size "20gb" --ipc host --gpus 0 
364+     steps :
365+       - name : Checkout diffusers 
366+         uses : actions/checkout@v3 
367+         with :
368+           fetch-depth : 2 
369+       - name : NVIDIA-SMI 
370+         run : nvidia-smi 
371+       - name : Install dependencies 
372+         run : | 
373+           python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" 
374+           python -m uv pip install -e [quality,test] 
375+           python -m uv pip install peft@git+https://github.com/huggingface/peft.git 
376+           pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git 
377+           python -m uv pip install -U ${{ matrix.config.backend }} 
378+           python -m uv pip install pytest-reportlog 
379+ name : Environment 
380+         run : | 
381+           python utils/print_env.py 
382+ name : ${{ matrix.config.backend }} quantization tests on GPU 
383+         env :
384+           HF_TOKEN : ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }} 
385+           #  https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
386+           CUBLAS_WORKSPACE_CONFIG : :16:8 
387+           BIG_GPU_MEMORY : 40 
388+         run : | 
389+           python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ 
390+             --make-reports=tests_${{ matrix.config.backend }}_torch_cuda \ 
391+             --report-log=tests_${{ matrix.config.backend }}_torch_cuda.log \ 
392+             tests/quantization/${{ matrix.config.test_location }} 
393+ name : Failure short reports 
394+         if : ${{ failure() }} 
395+         run : | 
396+           cat reports/tests_${{ matrix.config.backend }}_torch_cuda_stats.txt 
397+           cat reports/tests_${{ matrix.config.backend }}_torch_cuda_failures_short.txt 
398+ name : Test suite reports artifacts 
399+         if : ${{ always() }} 
400+         uses : actions/upload-artifact@v4 
401+         with :
402+           name : torch_cuda_${{ matrix.config.backend }}_reports 
403+           path : reports 
404+       - name : Generate Report and Notify Channel 
405+         if : always() 
406+         run : | 
407+           pip install slack_sdk tabulate 
408+           python utils/log_reports.py >> $GITHUB_STEP_SUMMARY 
409+ 
350410#  M1 runner currently not well supported
351411#  TODO: (Dhruv) add these back when we setup better testing for Apple Silicon
352412#   run_nightly_tests_apple_m1:
0 commit comments