Skip to content

Commit 02b06a7

Browse files
committed
[CI] Run all torchinductor jobs on MPS
ghstack-source-id: b79daf8 Pull Request resolved: #156773
1 parent 3dd872e commit 02b06a7

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.ci/pytorch/macos-test.sh

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -240,23 +240,25 @@ test_torchbench_smoketest() {
240240
dtype_arg="--float32"
241241
fi
242242
touch "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_performance.csv"
243-
for model in "${models[@]}"; do
244-
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/torchbench.py \
245-
--performance --only "$model" --backend "$backend" --inference --devices "$device" "$dtype_arg" \
246-
--output "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_performance.csv" || true
247-
if [ "$backend" == "inductor" ]; then
248-
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/torchbench.py \
249-
--accuracy --only "$model" --backend "$backend" --inference --devices "$device" "$dtype_arg" \
250-
--output "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_accuracy.csv" || true
251-
fi
252-
done
253243
if [ "$backend" == "inductor" ]; then
254244
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/huggingface.py \
255245
--performance --backend "$backend" --inference --devices "$device" "$dtype_arg" \
256246
--output "$TEST_REPORTS_DIR/inductor_${backend}_huggingface_${dtype}_inference_${device}_performance.csv" || true
257247
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/huggingface.py \
258248
--accuracy --backend "$backend" --inference --devices "$device" "$dtype_arg" \
259249
--output "$TEST_REPORTS_DIR/inductor_${backend}_huggingface_${dtype}_inference_${device}_accuracy.csv" || true
250+
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/torchbench.py \
251+
--performance --backend "$backend" --inference --devices "$device" "$dtype_arg" \
252+
--output "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_performance.csv" || true
253+
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/torchbench.py \
254+
--accuracy --backend "$backend" --inference --devices "$device" "$dtype_arg" \
255+
--output "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_accuracy.csv" || true
256+
else
257+
for model in "${models[@]}"; do
258+
PYTHONPATH="$(pwd)"/torchbench python benchmarks/dynamo/torchbench.py \
259+
--performance --only "$model" --backend "$backend" --inference --devices "$device" "$dtype_arg" \
260+
--output "$TEST_REPORTS_DIR/inductor_${backend}_torchbench_${dtype}_inference_${device}_performance.csv" || true
261+
done
260262
fi
261263

262264
if [ "$dtype" == notset ]; then

0 commit comments

Comments
 (0)