@@ -180,14 +180,128 @@ jobs:
180180 pip install slack_sdk tabulate
181181 python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
182182
183+ run_big_gpu_torch_tests :
184+ name : Torch tests on big GPU
185+ strategy :
186+ fail-fast : false
187+ max-parallel : 2
188+ runs-on :
189+ group : aws-g6e-xlarge-plus
190+ container :
191+ image : diffusers/diffusers-pytorch-cuda
192+ options : --shm-size "16gb" --ipc host --gpus 0
193+ steps :
194+ - name : Checkout diffusers
195+ uses : actions/checkout@v3
196+ with :
197+ fetch-depth : 2
198+ - name : NVIDIA-SMI
199+ run : nvidia-smi
200+ - name : Install dependencies
201+ run : |
202+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
203+ python -m uv pip install -e [quality,test]
204+ python -m uv pip install peft@git+https://github.com/huggingface/peft.git
205+ pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
206+ python -m uv pip install pytest-reportlog
207+ - name : Environment
208+ run : |
209+ python utils/print_env.py
210+ - name : Selected Torch CUDA Test on big GPU
211+ env :
212+ HF_TOKEN : ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
213+ # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
214+ CUBLAS_WORKSPACE_CONFIG : :16:8
215+ BIG_GPU_MEMORY : 40
216+ run : |
217+ python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
218+ -m "big_gpu_with_torch_cuda" \
219+ --make-reports=tests_big_gpu_torch_cuda \
220+ --report-log=tests_big_gpu_torch_cuda.log \
221+ tests/
222+ - name : Failure short reports
223+ if : ${{ failure() }}
224+ run : |
225+ cat reports/tests_big_gpu_torch_cuda_stats.txt
226+ cat reports/tests_big_gpu_torch_cuda_failures_short.txt
227+ - name : Test suite reports artifacts
228+ if : ${{ always() }}
229+ uses : actions/upload-artifact@v4
230+ with :
231+ name : torch_cuda_big_gpu_test_reports
232+ path : reports
233+ - name : Generate Report and Notify Channel
234+ if : always()
235+ run : |
236+ pip install slack_sdk tabulate
237+ python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
238+
239+ torch_minimum_version_cuda_tests :
240+ name : Torch Minimum Version CUDA Tests
241+ runs-on :
242+ group : aws-g4dn-2xlarge
243+ container :
244+ image : diffusers/diffusers-pytorch-minimum-cuda
245+ options : --shm-size "16gb" --ipc host --gpus 0
246+ defaults :
247+ run :
248+ shell : bash
249+ steps :
250+ - name : Checkout diffusers
251+ uses : actions/checkout@v3
252+ with :
253+ fetch-depth : 2
254+
255+ - name : Install dependencies
256+ run : |
257+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
258+ python -m uv pip install -e [quality,test]
259+ python -m uv pip install peft@git+https://github.com/huggingface/peft.git
260+ pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
261+
262+ - name : Environment
263+ run : |
264+ python utils/print_env.py
265+
266+ - name : Run PyTorch CUDA tests
267+ env :
268+ HF_TOKEN : ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
269+ # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
270+ CUBLAS_WORKSPACE_CONFIG : :16:8
271+ run : |
272+ python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
273+ -s -v -k "not Flax and not Onnx" \
274+ --make-reports=tests_torch_minimum_version_cuda \
275+ tests/models/test_modeling_common.py \
276+ tests/pipelines/test_pipelines_common.py \
277+ tests/pipelines/test_pipeline_utils.py \
278+ tests/pipelines/test_pipelines.py \
279+ tests/pipelines/test_pipelines_auto.py \
280+ tests/schedulers/test_schedulers.py \
281+ tests/others
282+
283+ - name : Failure short reports
284+ if : ${{ failure() }}
285+ run : |
286+ cat reports/tests_torch_minimum_version_cuda_stats.txt
287+ cat reports/tests_torch_minimum_version_cuda_failures_short.txt
288+
289+ - name : Test suite reports artifacts
290+ if : ${{ always() }}
291+ uses : actions/upload-artifact@v4
292+ with :
293+ name : torch_minimum_version_cuda_test_reports
294+ path : reports
295+
183296 run_flax_tpu_tests :
184297 name : Nightly Flax TPU Tests
185- runs-on : docker-tpu
298+ runs-on :
299+ group : gcp-ct5lp-hightpu-8t
186300 if : github.event_name == 'schedule'
187301
188302 container :
189303 image : diffusers/diffusers-flax-tpu
190- options : --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --privileged
304+ options : --shm-size "16gb" --ipc host --privileged ${{ vars.V5_LITEPOD_8_ENV}} - v /mnt/hf_cache:/mnt/hf_cache
191305 defaults :
192306 run :
193307 shell : bash
@@ -291,6 +405,77 @@ jobs:
291405 pip install slack_sdk tabulate
292406 python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
293407
408+ run_nightly_quantization_tests :
409+ name : Torch quantization nightly tests
410+ strategy :
411+ fail-fast : false
412+ max-parallel : 2
413+ matrix :
414+ config :
415+ - backend : " bitsandbytes"
416+ test_location : " bnb"
417+ additional_deps : ["peft"]
418+ - backend : " gguf"
419+ test_location : " gguf"
420+ additional_deps : []
421+ - backend : " torchao"
422+ test_location : " torchao"
423+ additional_deps : []
424+ - backend : " optimum_quanto"
425+ test_location : " quanto"
426+ additional_deps : []
427+ runs-on :
428+ group : aws-g6e-xlarge-plus
429+ container :
430+ image : diffusers/diffusers-pytorch-cuda
431+ options : --shm-size "20gb" --ipc host --gpus 0
432+ steps :
433+ - name : Checkout diffusers
434+ uses : actions/checkout@v3
435+ with :
436+ fetch-depth : 2
437+ - name : NVIDIA-SMI
438+ run : nvidia-smi
439+ - name : Install dependencies
440+ run : |
441+ python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
442+ python -m uv pip install -e [quality,test]
443+ python -m uv pip install -U ${{ matrix.config.backend }}
444+ if [ "${{ join(matrix.config.additional_deps, ' ') }}" != "" ]; then
445+ python -m uv pip install ${{ join(matrix.config.additional_deps, ' ') }}
446+ fi
447+ python -m uv pip install pytest-reportlog
448+ - name : Environment
449+ run : |
450+ python utils/print_env.py
451+ - name : ${{ matrix.config.backend }} quantization tests on GPU
452+ env :
453+ HF_TOKEN : ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
454+ # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
455+ CUBLAS_WORKSPACE_CONFIG : :16:8
456+ BIG_GPU_MEMORY : 40
457+ run : |
458+ python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
459+ --make-reports=tests_${{ matrix.config.backend }}_torch_cuda \
460+ --report-log=tests_${{ matrix.config.backend }}_torch_cuda.log \
461+ tests/quantization/${{ matrix.config.test_location }}
462+ - name : Failure short reports
463+ if : ${{ failure() }}
464+ run : |
465+ cat reports/tests_${{ matrix.config.backend }}_torch_cuda_stats.txt
466+ cat reports/tests_${{ matrix.config.backend }}_torch_cuda_failures_short.txt
467+ - name : Test suite reports artifacts
468+ if : ${{ always() }}
469+ uses : actions/upload-artifact@v4
470+ with :
471+ name : torch_cuda_${{ matrix.config.backend }}_reports
472+ path : reports
473+ - name : Generate Report and Notify Channel
474+ if : always()
475+ run : |
476+ pip install slack_sdk tabulate
477+ python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
478+
294479# M1 runner currently not well supported
295480# TODO: (Dhruv) add these back when we setup better testing for Apple Silicon
296481# run_nightly_tests_apple_m1:
@@ -329,7 +514,7 @@ jobs:
329514# shell: arch -arch arm64 bash {0}
330515# env:
331516# HF_HOME: /System/Volumes/Data/mnt/cache
332- # HF_TOKEN: ${{ secrets.HF_TOKEN }}
517+ # HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
333518# run: |
334519# ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
335520# --report-log=tests_torch_mps.log \
@@ -385,7 +570,7 @@ jobs:
385570# shell: arch -arch arm64 bash {0}
386571# env:
387572# HF_HOME: /System/Volumes/Data/mnt/cache
388- # HF_TOKEN: ${{ secrets.HF_TOKEN }}
573+ # HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
389574# run: |
390575# ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
391576# --report-log=tests_torch_mps.log \
@@ -405,4 +590,4 @@ jobs:
405590# if: always()
406591# run: |
407592# pip install slack_sdk tabulate
408- # python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
593+ # python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
0 commit comments