Skip to content

Commit 39aa3cb

Browse files
cyyeverpytorchmergebot
authored andcommitted
Re-enable skipped ubsan tests (pytorch#139008)
Fixes #ISSUE_NUMBER Pull Request resolved: pytorch#139008 Approved by: https://github.com/ezyang
1 parent d2052ea commit 39aa3cb

File tree

1 file changed

+4
-43
lines changed

1 file changed

+4
-43
lines changed

test/test_jit.py

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@
9595
# Testing utils
9696
from torch.testing._internal import jit_utils
9797
from torch.testing._internal.common_jit import check_against_reference
98-
from torch.testing._internal.common_utils import run_tests, IS_WINDOWS, TEST_WITH_UBSAN, \
99-
suppress_warnings, IS_SANDCASTLE, GRAPH_EXECUTOR, ProfilingMode, TestCase, \
100-
freeze_rng_state, slowTest, TemporaryFileName, \
98+
from torch.testing._internal.common_utils import run_tests, IS_WINDOWS, \
99+
suppress_warnings, IS_SANDCASTLE, GRAPH_EXECUTOR, ProfilingMode, \
100+
TestCase, freeze_rng_state, slowTest, TemporaryFileName, \
101101
enable_profiling_mode_for_profiling_tests, TEST_MKL, set_default_dtype, num_profiled_runs, \
102102
skipIfCrossRef, skipIfTorchDynamo
103103
from torch.testing._internal.jit_utils import JitTestCase, enable_cpu_fuser, disable_autodiff_subgraph_inlining, \
@@ -16008,44 +16008,6 @@ class TestJitGeneratedModule(JitTestCase):
1600816008
class TestJitGeneratedFunctional(JitTestCase):
1600916009
pass
1601016010

16011-
# UBSAN per-function exclusions don't seem to work with OpenMP pragmas,
16012-
# and we have to disable the failing tests here instead.
16013-
UBSAN_DISABLED_TESTS = [
16014-
"test___rdiv___constant",
16015-
"test___rdiv___scalar_constant",
16016-
"test_addcdiv",
16017-
"test_addcdiv_broadcast_all",
16018-
"test_addcdiv_broadcast_rhs",
16019-
"test_addcdiv_scalar",
16020-
"test_addcdiv_scalar_broadcast_lhs",
16021-
"test_addcdiv_scalar_broadcast_rhs",
16022-
"test_addcdiv_scalar_scale",
16023-
"test_addcdiv_scalar_scale_broadcast_lhs",
16024-
"test_addcdiv_scalar_scale_broadcast_rhs",
16025-
"test_addcdiv_scale",
16026-
"test_addcdiv_scale_broadcast_all",
16027-
"test_addcdiv_scale_broadcast_rhs",
16028-
"test_add_broadcast_all",
16029-
"test_add_broadcast_lhs",
16030-
"test_add_broadcast_rhs",
16031-
"test_add_constant",
16032-
"test_add_scalar",
16033-
"test_add_scalar_broadcast_lhs",
16034-
"test_add_scalar_broadcast_rhs",
16035-
"test_div",
16036-
"test_div_broadcast_all",
16037-
"test_div_broadcast_lhs",
16038-
"test_div_broadcast_rhs",
16039-
"test_div_scalar",
16040-
"test_div_scalar_broadcast_lhs",
16041-
"test_div_scalar_broadcast_rhs",
16042-
"test_rsqrt",
16043-
"test_rsqrt_scalar",
16044-
"test_add",
16045-
"test_reciprocal",
16046-
"test_reciprocal_scalar",
16047-
]
16048-
1604916011
L = 20
1605016012
M = 10
1605116013
S = 5
@@ -16183,8 +16145,7 @@ def post_add_test(test_name, skipTestIf, do_test, test_class):
1618316145
for skip in skipTestIf:
1618416146
do_test = skip(do_test)
1618516147

16186-
if not (TEST_WITH_UBSAN and test_name in UBSAN_DISABLED_TESTS):
16187-
setattr(test_class, test_name, do_test)
16148+
setattr(test_class, test_name, do_test)
1618816149

1618916150

1619016151
def normalize_check_ad(check_ad, name):

0 commit comments

Comments
 (0)