Skip to content

Commit 12cd2a2

Browse files
committed
test
1 parent 24cebce commit 12cd2a2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/pr_tests_gpu.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,18 @@ jobs:
9696
id: extract_tests
9797
run: |
9898
pattern=$(python utils/extract_tests_from_mixin.py --type pipeline)
99-
echo "TEST_PATTERN=${pattern}" >> $GITHUB_OUTPUT
99+
echo "$pattern" > /tmp/test_pattern.txt
100+
echo "pattern_file=/tmp/test_pattern.txt" >> $GITHUB_OUTPUT
100101
101102
- name: PyTorch CUDA checkpoint tests on Ubuntu
102103
env:
103104
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
104105
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
105106
CUBLAS_WORKSPACE_CONFIG: :16:8
106107
run: |
108+
pattern=$(cat ${{ steps.extract_tests.outputs.pattern_file }})
107109
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
108-
-s -v -k "not Flax and not Onnx ${{ steps.extract_tests.outputs.TEST_PATTERN }}" \
110+
-s -v -k "not Flax and not Onnx \"$pattern\"" \
109111
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
110112
tests/pipelines/${{ matrix.module }}
111113
@@ -158,16 +160,18 @@ jobs:
158160
id: extract_tests
159161
run: |
160162
pattern=$(python utils/extract_tests_from_mixin.py --type ${{ matrix.module }})
161-
echo "TEST_PATTERN=${pattern}" >> $GITHUB_OUTPUT
163+
echo "$pattern" > /tmp/test_pattern.txt
164+
echo "pattern_file=/tmp/test_pattern.txt" >> $GITHUB_OUTPUT
162165
163166
- name: Run PyTorch CUDA tests
164167
env:
165168
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
166169
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
167170
CUBLAS_WORKSPACE_CONFIG: :16:8
168171
run: |
172+
pattern=$(cat ${{ steps.extract_tests.outputs.pattern_file }})
169173
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
170-
-s -v -k "not Flax and not Onnx and ${{ steps.extract_tests.outputs.TEST_PATTERN }}" \
174+
-s -v -k "not Flax and not Onnx and \"$pattern\"" \
171175
--make-reports=tests_torch_cuda_${{ matrix.module }} \
172176
tests/${{ matrix.module }}
173177

0 commit comments

Comments
 (0)