Skip to content

Commit 35f6297

Browse files
authored
[ci] Reduce test parallelism for m1 (#4394)
* [ci] Reduce test parallelism for m1 * Use PLATFORM * Remove metal from self gpu runners
1 parent 67a038f commit 35f6297

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/scripts/unix_test.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,18 @@ TI_PATH=$(python3 -c "import taichi;print(taichi.__path__[0])" | tail -1)
3535
TI_LIB_DIR="$TI_PATH/_lib/runtime" ./build/taichi_cpp_tests
3636

3737
if [ -z "$GPU_TEST" ]; then
38-
python3 tests/run_tests.py -vr2 -t4 -a "$TI_WANTED_ARCHS"
38+
if [[ $PLATFORM == *"m1"* ]]; then
39+
# Split per arch to avoid flaky test
40+
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a cpu
41+
# Run metal and vulkan separately so that they don't use M1 chip simultaneously.
42+
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a vulkan
43+
python3 tests/run_tests.py -vr2 -t2 -k "not torch" -a metal
44+
python3 tests/run_tests.py -vr2 -t1 -k "torch" -a "$TI_WANTED_ARCHS"
45+
else
46+
python3 tests/run_tests.py -vr2 -t4 -a "$TI_WANTED_ARCHS"
47+
fi
3948
else
40-
# only split per arch for self_hosted GPU tests
49+
# Split per arch to increase parallelism for linux GPU tests
4150
if [[ $TI_WANTED_ARCHS == *"cuda"* ]]; then
4251
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a cuda
4352
fi
@@ -50,9 +59,5 @@ else
5059
if [[ $TI_WANTED_ARCHS == *"opengl"* ]]; then
5160
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a opengl
5261
fi
53-
# Run metal and vulkan separately so that they don't use M1 chip simultaneously.
54-
if [[ $TI_WANTED_ARCHS == *"metal"* ]]; then
55-
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a metal
56-
fi
5762
python3 tests/run_tests.py -vr2 -t1 -k "torch" -a "$TI_WANTED_ARCHS"
5863
fi

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,4 +466,4 @@ jobs:
466466
env:
467467
TI_WANTED_ARCHS: "metal,vulkan,cpu"
468468
PY: ${{ matrix.python }}
469-
GPU_TEST: ON
469+
PLATFORM: "m1"

0 commit comments

Comments
 (0)