Skip to content

Commit 551e412

Browse files
nWEIdiapytorchmergebot
authored andcommitted
[CUDA][Inductor][CI] Revert PR#127150 since cu124 is now behaving similar enough to cu121 (#128423)
Pre-requisite: close #126692 first. This PR also gives a current read on cu121 and cu124 parity. Essentially reverting #127150 Pull Request resolved: #128423 Approved by: https://github.com/atalman, https://github.com/eqy
1 parent 79959d7 commit 551e412

38 files changed

Lines changed: 6 additions & 9393 deletions

.ci/pytorch/test.sh

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,6 @@ elif [[ $TEST_CONFIG == 'nogpu_AVX512' ]]; then
264264
export ATEN_CPU_CAPABILITY=avx2
265265
fi
266266

267-
# temp workarounds for https://github.com/pytorch/pytorch/issues/126692, remove when fixed
268-
if [[ "$BUILD_ENVIRONMENT" != *-bazel-* ]]; then
269-
pushd test
270-
CUDA_VERSION=$(python -c "import torch; print(torch.version.cuda)")
271-
if [ "$CUDA_VERSION" == "12.4" ]; then
272-
ISCUDA124="cu124"
273-
else
274-
ISCUDA124=""
275-
fi
276-
popd
277-
fi
278-
279267
test_python_legacy_jit() {
280268
time python test/run_test.py --include test_jit_legacy test_jit_fuser_legacy --verbose
281269
assert_git_not_dirty
@@ -393,7 +381,7 @@ test_inductor_cpp_wrapper_abi_compatible() {
393381
--output "$TEST_REPORTS_DIR/inductor_cpp_wrapper_training.csv"
394382
python benchmarks/dynamo/check_accuracy.py \
395383
--actual "$TEST_REPORTS_DIR/inductor_cpp_wrapper_training.csv" \
396-
--expected "benchmarks/dynamo/ci_expected_accuracy/${ISCUDA124}/inductor_timm_training.csv"
384+
--expected "benchmarks/dynamo/ci_expected_accuracy/inductor_timm_training.csv"
397385
}
398386

399387
# "Global" flags for inductor benchmarking controlled by TEST_CONFIG
@@ -555,10 +543,10 @@ test_single_dynamo_benchmark() {
555543
--output "$TEST_REPORTS_DIR/${name}_${suite}.csv"
556544
python benchmarks/dynamo/check_accuracy.py \
557545
--actual "$TEST_REPORTS_DIR/${name}_$suite.csv" \
558-
--expected "benchmarks/dynamo/ci_expected_accuracy/${ISCUDA124}/${TEST_CONFIG}_${name}.csv"
546+
--expected "benchmarks/dynamo/ci_expected_accuracy/${TEST_CONFIG}_${name}.csv"
559547
python benchmarks/dynamo/check_graph_breaks.py \
560548
--actual "$TEST_REPORTS_DIR/${name}_$suite.csv" \
561-
--expected "benchmarks/dynamo/ci_expected_accuracy/${ISCUDA124}/${TEST_CONFIG}_${name}.csv"
549+
--expected "benchmarks/dynamo/ci_expected_accuracy/${TEST_CONFIG}_${name}.csv"
562550
fi
563551
}
564552

@@ -618,7 +606,7 @@ test_inductor_torchbench_smoketest_perf() {
618606
--bfloat16 --inference --inductor --only moco --output "$TEST_REPORTS_DIR/inductor_cpp_wrapper_inference.csv"
619607
python benchmarks/dynamo/check_accuracy.py \
620608
--actual "$TEST_REPORTS_DIR/inductor_cpp_wrapper_inference.csv" \
621-
--expected "benchmarks/dynamo/ci_expected_accuracy/${ISCUDA124}/inductor_torchbench_inference.csv"
609+
--expected "benchmarks/dynamo/ci_expected_accuracy/inductor_torchbench_inference.csv"
622610

623611
python benchmarks/dynamo/torchbench.py --device cuda --performance --backend inductor --float16 --training \
624612
--batch-size-file "$(realpath benchmarks/dynamo/torchbench_models_list.txt)" --only hf_Bert \
@@ -633,13 +621,7 @@ test_inductor_torchbench_smoketest_perf() {
633621
# https://github.com/pytorch/pytorch/actions/runs/7158691360/job/19491437314,
634622
# and thus we lower its threshold to reduce flakiness. If this continues to be a problem,
635623
# we switch to use some other model.
636-
# Use 4.7 for cuda 12.4, change back to 4.9 after fixing https://github.com/pytorch/pytorch/issues/126692
637-
if [ "$CUDA_VERSION" == "12.4" ]; then
638-
THRESHOLD=4.7
639-
else
640-
THRESHOLD=4.9
641-
fi
642-
python benchmarks/dynamo/check_perf_csv.py -f "$TEST_REPORTS_DIR/inductor_inference_smoketest.csv" -t $THRESHOLD
624+
python benchmarks/dynamo/check_perf_csv.py -f "$TEST_REPORTS_DIR/inductor_inference_smoketest.csv" -t 4.9
643625

644626
# Check memory compression ratio for a few models
645627
for test in hf_Albert timm_vision_transformer; do
@@ -658,7 +640,7 @@ test_inductor_torchbench_smoketest_perf() {
658640
--only $test --output "$TEST_REPORTS_DIR/inductor_warm_start_smoketest_$test.csv"
659641
python benchmarks/dynamo/check_accuracy.py \
660642
--actual "$TEST_REPORTS_DIR/inductor_warm_start_smoketest_$test.csv" \
661-
--expected "benchmarks/dynamo/ci_expected_accuracy/${ISCUDA124}/inductor_huggingface_training.csv"
643+
--expected "benchmarks/dynamo/ci_expected_accuracy/inductor_huggingface_training.csv"
662644
done
663645
}
664646

benchmarks/dynamo/ci_expected_accuracy/cu124/aot_eager_huggingface_inference.csv

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)