Revert "[CI] Relax config name matching for cpu inductor tests (#131467)"
This reverts commit aa54bcb6d25fc7c9ac23b82b74ea45f03033c8b2.
Reverted https://github.com/pytorch/pytorch/pull/131467 on behalf of https://github.com/atalman due to Sorry need to revert looks like https://github.com/pytorch/pytorch/pull/131369 broke inductor tests ([comment](https://github.com/pytorch/pytorch/pull/131467#issuecomment-2246136839))
diff --git a/.ci/pytorch/test.sh b/.ci/pytorch/test.sh
index 9d5384f..2d83091 100755
--- a/.ci/pytorch/test.sh
+++ b/.ci/pytorch/test.sh
@@ -405,7 +405,7 @@
DYNAMO_BENCHMARK_FLAGS+=(--dynamic-shapes --dynamic-batch-only)
fi
-if [[ "${TEST_CONFIG}" == *cpu* ]]; then
+if [[ "${TEST_CONFIG}" == *cpu_inductor* || "${TEST_CONFIG}" == *cpu_aot_inductor* || "${TEST_CONFIG}" == *perf_cpu* ]]; then
DYNAMO_BENCHMARK_FLAGS+=(--device cpu)
else
DYNAMO_BENCHMARK_FLAGS+=(--device cuda)
@@ -431,7 +431,7 @@
local device=cuda
local taskset=""
- if [[ "${TEST_CONFIG}" == *cpu-x86* ]]; then
+ if [[ "${TEST_CONFIG}" == *perf_cpu-x86* ]]; then
device=cpu-x86
end_core=$(test_inductor_set_cpu_affinity)
taskset="taskset -c 0-$end_core"
@@ -582,7 +582,7 @@
elif [[ "${TEST_CONFIG}" == *perf* ]]; then
test_single_dynamo_benchmark "dashboard" "$suite" "$shard_id" "$@"
else
- if [[ "${TEST_CONFIG}" == *cpu* ]]; then
+ if [[ "${TEST_CONFIG}" == *cpu_inductor* || "${TEST_CONFIG}" == *cpu_aot_inductor* ]]; then
local dt="float32"
if [[ "${TEST_CONFIG}" == *amp* ]]; then
dt="amp"
@@ -1279,7 +1279,7 @@
id=$((SHARD_NUMBER-1))
test_dynamo_benchmark timm_models "$id"
elif [[ "${TEST_CONFIG}" == *torchbench* ]]; then
- if [[ "${TEST_CONFIG}" == *cpu* ]]; then
+ if [[ "${TEST_CONFIG}" == *cpu_inductor* || "${TEST_CONFIG}" == *cpu_aot_inductor* ]]; then
install_torchaudio cpu
else
install_torchaudio cuda
@@ -1305,7 +1305,7 @@
checkout_install_torchbench
# Do this after checkout_install_torchbench to ensure we clobber any
# nightlies that torchbench may pull in
- if [[ "${TEST_CONFIG}" != *cpu* ]]; then
+ if [[ "${TEST_CONFIG}" != *cpu_inductor* && "${TEST_CONFIG}" != *cpu_aot_inductor* ]]; then
install_torchrec_and_fbgemm
fi
PYTHONPATH=$(pwd)/torchbench test_dynamo_benchmark torchbench "$id"