Skip to content

Commit d7e01f1

Browse files
committed
split tests
1 parent b57db59 commit d7e01f1

File tree

1 file changed

+89
-11
lines changed

1 file changed

+89
-11
lines changed

.github/workflows/pr_tests_mps.yml

Lines changed: 89 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,46 @@ concurrency:
2727

2828
jobs:
2929
run_fast_tests_apple_m1:
30-
name: Fast PyTorch MPS tests on MacOS
31-
runs-on: macos-13-xlarge
30+
strategy:
31+
matrix:
32+
config:
33+
- name: Fast Pipelines MPS tests
34+
framework: pytorch_pipelines
35+
runner: macos-13-xlarge
36+
report: torch_mps_pipelines
37+
- name: Fast Models MPS tests
38+
framework: pytorch_models
39+
runner: macos-13-xlarge
40+
report: torch_mps_models
41+
- name: Fast Schedulers MPS tests
42+
framework: pytorch_schedulers
43+
runner: macos-13-xlarge
44+
report: torch_mps_schedulers
45+
- name: Fast Others MPS tests
46+
framework: pytorch_others
47+
runner: macos-13-xlarge
48+
report: torch_mps_others
49+
- name: Fast Single File MPS tests
50+
framework: pytorch_single_file
51+
runner: macos-13-xlarge
52+
report: torch_mps_single_file
53+
- name: Fast Lora MPS tests
54+
framework: pytorch_lora
55+
runner: macos-13-xlarge
56+
report: torch_mps_lora
57+
- name: Fast Quantization MPS tests
58+
framework: pytorch_quantization
59+
runner: macos-13-xlarge
60+
report: torch_mps_quantization
61+
62+
name: ${{ matrix.config.name }}
63+
64+
runs-on:
65+
group: ${{ matrix.config.runner }}
66+
67+
defaults:
68+
run:
69+
shell: arch -arch arm64 bash {0}
3270

3371
steps:
3472
- name: Checkout diffusers
@@ -37,7 +75,6 @@ jobs:
3775
fetch-depth: 2
3876

3977
- name: Clean checkout
40-
shell: arch -arch arm64 bash {0}
4178
run: |
4279
git clean -fxd
4380
@@ -47,7 +84,6 @@ jobs:
4784
python-version: 3.9
4885

4986
- name: Install dependencies
50-
shell: arch -arch arm64 bash {0}
5187
run: |
5288
${CONDA_RUN} python -m pip install --upgrade pip uv
5389
${CONDA_RUN} python -m uv pip install -e ".[quality,test]"
@@ -60,20 +96,62 @@ jobs:
6096
run: |
6197
${CONDA_RUN} python utils/print_env.py
6298
63-
- name: Run fast PyTorch tests on M1 (MPS)
64-
shell: arch -arch arm64 bash {0}
65-
env:
66-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
99+
- name: Run fast PyTorch Pipeline MPS tests
100+
if: ${{ matrix.config.framework == 'pytorch_pipelines' }}
101+
run: |
102+
${CONDA_RUN} python -m pytest -n 0 -s -v -k "not Flax and not Onnx" \
103+
--make-reports=tests_${{ matrix.config.report }} \
104+
tests/pipelines
105+
106+
- name: Run fast PyTorch Models MPS tests
107+
if: ${{ matrix.config.framework == 'pytorch_models' }}
108+
run: |
109+
${CONDA_RUN} python -m pytest -n 0 -s -v -k "not Flax and not Onnx and not Dependency" \
110+
--make-reports=tests_${{ matrix.config.report }} \
111+
tests/models/
112+
113+
- name: Run fast PyTorch Schedulers MPS tests
114+
if: ${{ matrix.config.framework == 'pytorch_schedulers' }}
115+
run: |
116+
${CONDA_RUN} python -m pytest -n 0 -s -v -k "not Flax and not Onnx and not Dependency" \
117+
--make-reports=tests_${{ matrix.config.report }} \
118+
tests/schedulers/
119+
120+
- name: Run fast PyTorch Others MPS tests
121+
if: ${{ matrix.config.framework == 'pytorch_others' }}
122+
run: |
123+
${CONDA_RUN} python -m pytest -n 0 -s -v \
124+
--make-reports=tests_${{ matrix.config.report }} \
125+
tests/others/
126+
127+
- name: Run fast PyTorch Single File MPS tests
128+
if: ${{ matrix.config.framework == 'pytorch_single_file' }}
129+
run: |
130+
${CONDA_RUN} python -m pytest -n 0 -s -v \
131+
--make-reports=tests_${{ matrix.config.report }} \
132+
tests/single_file/
133+
134+
- name: Run fast PyTorch Lora MPS tests
135+
if: ${{ matrix.config.framework == 'pytorch_lora' }}
136+
run: |
137+
${CONDA_RUN} python -m pytest -n 0 -s -v \
138+
--make-reports=tests_${{ matrix.config.report }} \
139+
tests/lora/
140+
141+
- name: Run fast PyTorch Quantization MPS tests
142+
if: ${{ matrix.config.framework == 'pytorch_quantization' }}
67143
run: |
68-
${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/
144+
${CONDA_RUN} python -m pytest -n 0 -s -v \
145+
--make-reports=tests_${{ matrix.config.report }} \
146+
tests/quantization/
69147
70148
- name: Failure short reports
71149
if: ${{ failure() }}
72-
run: cat reports/tests_torch_mps_failures_short.txt
150+
run: cat reports/tests_${{ matrix.config.report }}_failures_short.txt
73151

74152
- name: Test suite reports artifacts
75153
if: ${{ always() }}
76154
uses: actions/upload-artifact@v4
77155
with:
78-
name: pr_torch_mps_test_reports
156+
name: pr_${{ matrix.config.framework }}_${{ matrix.config.report }}_test_reports
79157
path: reports

0 commit comments

Comments
 (0)