From 5aa895e53e56bb5fee5afb53fe5f32ea51d1dee9 Mon Sep 17 00:00:00 2001 From: rzou Date: Thu, 18 Jan 2024 07:56:15 -0800 Subject: [PATCH] Don't run inductor tests in Dynamo shard (#117747) In theory we could, but these get really slow once we turn on strict mode, so we're not going to for now. Pull Request resolved: https://github.com/pytorch/pytorch/pull/117747 Approved by: https://github.com/bdhirsh ghstack dependencies: #117729 --- .ci/pytorch/test.sh | 1 + test/run_test.py | 11 ++++ .../testing/_internal/dynamo_test_failures.py | 55 ------------------- 3 files changed, 12 insertions(+), 55 deletions(-) diff --git a/.ci/pytorch/test.sh b/.ci/pytorch/test.sh index 2e3b8e91a2d..8c8c07a1020 100755 --- a/.ci/pytorch/test.sh +++ b/.ci/pytorch/test.sh @@ -271,6 +271,7 @@ test_dynamo_shard() { # PLEASE DO NOT ADD ADDITIONAL EXCLUDES HERE. # Instead, use @skipIfTorchDynamo on your tests. time python test/run_test.py --dynamo \ + --exclude-inductor-tests \ --exclude-jit-executor \ --exclude-distributed-tests \ --exclude \ diff --git a/test/run_test.py b/test/run_test.py index 985bdb08846..64e1496a4a2 100755 --- a/test/run_test.py +++ b/test/run_test.py @@ -70,6 +70,7 @@ RERUN_DISABLED_TESTS = os.getenv("PYTORCH_TEST_RERUN_DISABLED_TESTS", "0") == "1 CPP_TEST_PREFIX = "cpp" CPP_TEST_PATH = "build/bin" DISTRIBUTED_TEST_PREFIX = "distributed" +INDUCTOR_TEST_PREFIX = "inductor" # Note [ROCm parallel CI testing] @@ -437,6 +438,7 @@ JIT_EXECUTOR_TESTS = [ "test_jit_fuser_legacy", ] +INDUCTOR_TESTS = [test for test in TESTS if test.startswith(INDUCTOR_TEST_PREFIX)] DISTRIBUTED_TESTS = [test for test in TESTS if test.startswith(DISTRIBUTED_TEST_PREFIX)] FUNCTORCH_TESTS = [test for test in TESTS if test.startswith("functorch")] ONNX_TESTS = [test for test in TESTS if test.startswith("onnx")] @@ -1242,6 +1244,11 @@ def parse_args(): action="store_true", help="exclude distributed tests", ) + parser.add_argument( + "--exclude-inductor-tests", + action="store_true", + help="exclude inductor tests", + ) parser.add_argument( "--dry-run", action="store_true", @@ -1364,6 +1371,9 @@ def get_selected_tests(options) -> List[str]: if options.exclude_distributed_tests: options.exclude.extend(DISTRIBUTED_TESTS) + if options.exclude_inductor_tests: + options.exclude.extend(INDUCTOR_TESTS) + # these tests failing in CUDA 11.6 temporary disabling. issue https://github.com/pytorch/pytorch/issues/75375 if torch.version.cuda is not None: options.exclude.extend(["distributions/test_constraints"]) @@ -1747,6 +1757,7 @@ def main(): if options.dynamo: os.environ["PYTORCH_TEST_WITH_DYNAMO"] = "1" + elif options.inductor: os.environ["PYTORCH_TEST_WITH_INDUCTOR"] = "1" diff --git a/torch/testing/_internal/dynamo_test_failures.py b/torch/testing/_internal/dynamo_test_failures.py index 6888f3906cb..35f5c1c37cb 100644 --- a/torch/testing/_internal/dynamo_test_failures.py +++ b/torch/testing/_internal/dynamo_test_failures.py @@ -1,61 +1,6 @@ # tests in this list will run without Dynamo strict mode by default. FIXME_default_non_strict = { "dynamo/test_logging", - "inductor/test_aot_inductor", - "inductor/test_aot_inductor_utils", - "inductor/test_benchmark_fusion", - "inductor/test_binary_folding", - "inductor/test_codecache", - "inductor/test_codegen_triton", - "inductor/test_compiled_autograd", - "inductor/test_compiled_optimizers", - "inductor/test_config", - "inductor/test_coordinate_descent_tuner", - "inductor/test_cpu_cpp_wrapper", - "inductor/test_cpu_repro", - "inductor/test_cuda_cpp_wrapper", - "inductor/test_cuda_repro", - "inductor/test_cudacodecache", - "inductor/test_cudagraph_trees", - "inductor/test_custom_lowering", - "inductor/test_custom_post_grad_passes", - "inductor/test_debug_trace", - "inductor/test_dependencies", - "inductor/test_efficient_conv_bn_eval", - "inductor/test_extension_backend", - "inductor/test_foreach", - "inductor/test_fp8", - "inductor/test_fused_attention", - "inductor/test_fx_fusion", - "inductor/test_group_batch_fusion", - "inductor/test_indexing", - "inductor/test_inductor_freezing", - "inductor/test_inductor_utils", - "inductor/test_inplacing_pass", - "inductor/test_kernel_benchmark", - "inductor/test_layout_optim", - "inductor/test_max_autotune", - "inductor/test_memory_planning", - "inductor/test_minifier", - "inductor/test_minifier_isolate", - "inductor/test_mkldnn_pattern_matcher", - "inductor/test_mmdecomp", - "inductor/test_move_constructors_to_cuda", - "inductor/test_pattern_matcher", - "inductor/test_perf", - "inductor/test_profiler", - "inductor/test_select_algorithm", - "inductor/test_smoke", - "inductor/test_snode_runtime", - "inductor/test_split_cat_fx_passes", - "inductor/test_standalone_compile", - "inductor/test_torchinductor", - "inductor/test_torchinductor_codegen_dynamic_shapes", - "inductor/test_torchinductor_dynamic_shapes", - "inductor/test_torchinductor_opinfo", - "inductor/test_triton_heuristics", - "inductor/test_triton_wrapper", - "inductor/test_unbacked_symints", "test_custom_ops", "test_python_dispatch", }