Skip to content

Commit

Permalink
[ci] Reduce test parallelism for m1 (#4394)
Browse files Browse the repository at this point in the history
* [ci] Reduce test parallelism for m1

* Use PLATFORM

* Remove metal from self gpu runners
  • Loading branch information
qiao-bo authored Feb 28, 2022
1 parent 67a038f commit 35f6297
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/scripts/unix_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@ TI_PATH=$(python3 -c "import taichi;print(taichi.__path__[0])" | tail -1)
TI_LIB_DIR="$TI_PATH/_lib/runtime" ./build/taichi_cpp_tests

if [ -z "$GPU_TEST" ]; then
python3 tests/run_tests.py -vr2 -t4 -a "$TI_WANTED_ARCHS"
if [[ $PLATFORM == *"m1"* ]]; then
# Split per arch to avoid flaky test
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a cpu
# Run metal and vulkan separately so that they don't use M1 chip simultaneously.
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a vulkan
python3 tests/run_tests.py -vr2 -t2 -k "not torch" -a metal
python3 tests/run_tests.py -vr2 -t1 -k "torch" -a "$TI_WANTED_ARCHS"
else
python3 tests/run_tests.py -vr2 -t4 -a "$TI_WANTED_ARCHS"
fi
else
# only split per arch for self_hosted GPU tests
# Split per arch to increase parallelism for linux GPU tests
if [[ $TI_WANTED_ARCHS == *"cuda"* ]]; then
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a cuda
fi
Expand All @@ -50,9 +59,5 @@ else
if [[ $TI_WANTED_ARCHS == *"opengl"* ]]; then
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a opengl
fi
# Run metal and vulkan separately so that they don't use M1 chip simultaneously.
if [[ $TI_WANTED_ARCHS == *"metal"* ]]; then
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a metal
fi
python3 tests/run_tests.py -vr2 -t1 -k "torch" -a "$TI_WANTED_ARCHS"
fi
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,4 +466,4 @@ jobs:
env:
TI_WANTED_ARCHS: "metal,vulkan,cpu"
PY: ${{ matrix.python }}
GPU_TEST: ON
PLATFORM: "m1"

0 comments on commit 35f6297

Please sign in to comment.