Remove unnecessary skipIfTorchDynamo from test_jit_fuser_te (#118728)

And add some expected failures.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/118728
Approved by: https://github.com/bdhirsh
This commit is contained in:
rzou
2024-02-12 11:25:34 -08:00
committed by PyTorch MergeBot
parent 28c30f29be
commit 7eecbf8a30
3 changed files with 53 additions and 10 deletions

View File

@ -344,7 +344,6 @@ class FooToPickle(torch.nn.Module):
self.bar = torch.jit.ScriptModule()
@skipIfTorchDynamo()
class TestJitProfiler(JitTestCase):
"""
This runs tests that requires setting some global states like torch._C._set_graph_executor_optimize
@ -409,7 +408,6 @@ class TestJitProfiler(JitTestCase):
self.assertTrue(other_fn_events[thread] >= mul_time)
@skipIfTorchDynamo()
class TestJit(JitTestCase):
@unittest.skip("Requires a lot of RAM")
def test_big(self):
@ -2944,7 +2942,6 @@ graph(%Ra, %Rb):
self.assertRegex(graph.__repr__(), source_range_regex)
@skipIfTorchDynamo()
class TestFrontend(JitTestCase):
def test_instancing_error(self):
@ -3001,7 +2998,6 @@ class TestFrontend(JitTestCase):
res_2 = traced_model_2(**{'x': torch.rand([2]), 'z': torch.rand([2])}) # noqa: PIE804
@skipIfTorchDynamo()
class TestScript(JitTestCase):
# Tests that calling torch.jit.script repeated on function is allowed.
@ -16041,12 +16037,10 @@ EXCLUDE_ALIAS = {
}
@skipIfTorchDynamo()
class TestJitGeneratedModule(JitTestCase):
pass
@skipIfTorchDynamo()
class TestJitGeneratedFunctional(JitTestCase):
pass

View File

@ -82,7 +82,6 @@ def inline_fusion_groups():
torch._C._debug_set_fusion_group_inlining(old_inlining)
@skipIfTorchDynamo()
class TestTEFuser(JitTestCase):
def setUp(self):
super().setUp()
@ -1924,6 +1923,7 @@ class TestTEFuser(JitTestCase):
t = torch.rand(8, dtype=torch.float, device=device)
scripted = self.checkScript(eager, (t, t, t, t, 0.1))
@skipIfTorchDynamo("too slow")
def test_chunk_mul_one(self):
if self.dynamic_shapes:
self.skipTest("TODO: chunk dynamic shapes")
@ -2200,6 +2200,7 @@ class TestTEFuser(JitTestCase):
x = torch.ones((8, 1))
torch.testing.assert_close(eager(x), script(x))
@skipIfTorchDynamo("too slow")
@unittest.skipIf(TEST_WITH_ASAN, "takes 10+ minutes on asan")
def test_batch_norm(self):
def test(fn, args):
@ -2626,7 +2627,6 @@ def get_name(op):
# super() [with no arguments] fails, presumably because of how instantiate_device_type_tests works.
# super(TestNNCOpInfo, self) fails because TestNNCOpInfo gets deleted from global scope.
# super(JitCommonTestCase, self).fn() would skip JitCommonTestCase.fn() implementation
@skipIfTorchDynamo()
class TestNNCOpInfoParent(JitCommonTestCase):
pass
@ -2681,7 +2681,6 @@ def f({', '.join(param_names)}):
self.assertEqual(kernel.fallback(tuple(param_values)), correct_val)
@onlyCPU
@skipIfTorchDynamo("TorchDynamo fails here for unknown reasons")
@unittest.skipIf(not LLVM_ENABLED, "Compiles with TensorExprKernel")
@ops([op for op in op_db if get_name(op) in works_list], allowed_dtypes=(torch.float,))
def test_working(self, device, dtype, op):
@ -2745,7 +2744,6 @@ only_for = ("cuda") if IS_FBCODE else ("cpu", "cuda")
instantiate_device_type_tests(TestNNCOpInfo, globals(), only_for=only_for)
# Purpose of this class is to allow super() calls. (See TestNNCOpInfoParent)
@skipIfTorchDynamo()
class TestLoopnestRandomizationParent(JitTestCase):
pass

View File

@ -43,6 +43,54 @@ dynamo_expected_failures = {
"TestIndexingCPU.test_index_cpu",
"TestIndexingCPU.test_index_limits_cpu",
"NumpyTestsCPU.test_boolean_indexing_weirdness_cpu",
"TestScript.test_torch_functional_tensordot_int", # test_jit.py
"TestScript.test_python_call_non_tensor_wrong", # test_jit.py
"TestTEFuserStatic.test_remove_output_used_only_in_size", # test_jit_fuser_te.py
"TestScript.test_method_overloading", # test_jit.py
"TestScript.test_pack_unpack_state", # test_jit.py
"TestScript.test_string_device_implicit_conversion", # test_jit.py
"TestScript.test_error_stacktrace_interface", # test_jit.py
"TestScript.test_torchscript_multi_head_attn", # test_jit.py
"TestTEFuserStatic.test_gelu", # test_jit_fuser_te.py
"TestTEFuserDynamic.test_profiler", # test_jit_fuser_te.py
"TestScript.test_is_scripting", # test_jit.py
"TestScript.test_function_overloading_isinstance", # test_jit.py
"TestJit.test_function_default_values", # test_jit.py
"TestTEFuserDynamic.test_torch_to", # test_jit_fuser_te.py
"TestScript.test_wrong_return_type", # test_jit.py
"TestScript.test_type_annotation_module", # test_jit.py
"TestScript.test_python_op_builtins", # test_jit.py
"TestScript.test_nn_GRU", # test_jit.py
"TestScript.test_function_overloads", # test_jit.py
"TestScript.test_script_optional_none", # test_jit.py
"TestScript.test_namedtuple_python", # test_jit.py
"TestTEFuserStatic.test_profiler", # test_jit_fuser_te.py
"TestScript.test_none_type_str", # test_jit.py
"TestScript.test_isinstance_dynamic", # test_jit.py
"TestScript.test_python_call", # test_jit.py
"TestScript.test_parse_nested_names", # test_jit.py
"TestScript.test_parse_tensor_constants", # test_jit.py
"TestTEFuserDynamic.test_to_dtype", # test_jit_fuser_te.py
"TestTEFuserStatic.test_to_dtype", # test_jit_fuser_te.py
"TestScript.test_empty_tuple_str", # test_jit.py
"TestScript.test_nn_LSTM_with_layers", # test_jit.py
"TestScript.test_unused_decorator", # test_jit.py
"TestTEFuserDynamic.test_remove_output_used_only_in_size", # test_jit_fuser_te.py
"TestScript.test_no_self_arg_ignore_function", # test_jit.py
"TestScript.test_tuple_str", # test_jit.py
"TestScript.test_is_after_use", # test_jit.py
"TestTEFuserStatic.test_torch_to", # test_jit_fuser_te.py
"TestScript.test_nested_breaks", # test_jit.py
"TestScript.test_infer_size", # test_jit.py
"TestTEFuserDynamic.test_gelu", # test_jit_fuser_te.py
"TestScript.test_conv_error", # test_jit.py
"TestTEFuserStatic.test_skip_grad_in_check", # test_jit_fuser_te.py
"TestScript.test_ignored_as_value", # test_jit.py
"TestScript.test_unspecialized_any_binding", # test_jit.py
"TestScript.test_namedtuple_default_values_using_factory_constructor", # test_jit.py
"TestScript.test_dict_str", # test_jit.py
"TestJit.test_batchnorm", # test_jit.py
"TestTEFuserStatic.test_inlined_optimized_graph", # test_jit_fuser_te.py
"TestLinalgCPU.test_inverse_cpu_float32",
"TestLinalgCPU.test_slogdet_errors_and_warnings_cpu_float32",
"TestLinalgCPU.test_inverse_cpu_complex128",
@ -4094,6 +4142,9 @@ dynamo_skips = {
"TestProxyTensorOpInfoCPU.test_make_fx_exhaustive_eye_cpu_float32", # known py38 fail
"TestProxyTensorOpInfoCPU.test_make_fx_symbolic_exhaustive_jiterator_2inputs_2outputs_cpu_float32", # known py38 fail # noqa: B950
"TestProxyTensorOpInfoCPU.test_make_fx_exhaustive_diag_embed_cpu_float32", # known py38 fail
"TestTEFuserDynamic.test_matmul", # known py38 fail
"TestTEFuserStatic.test_unary_ops", # known py311 fail
"TestTEFuserDynamic.test_unary_ops", # known py311 fail
"TestProxyTensorOpInfoCPU.test_make_fx_fake_exhaustive_nn_functional_softmin_cpu_float32", # known py38 fail
"TestProxyTensorOpInfoCPU.test_make_fx_symbolic_exhaustive_masked_fill_cpu_float32", # known py38 fail
"TestProxyTensorOpInfoCPU.test_make_fx_symbolic_exhaustive_broadcast_tensors_cpu_float32", # known py38 fail