William Wen
2023-10-28 04:14:53 +00:00
committed by PyTorch MergeBot
parent 31f605344f
commit a380bf3297
3 changed files with 13 additions and 0 deletions

View File

@ -17,6 +17,7 @@ from torch.testing._internal.common_utils import (
skipIfTorchDynamo,
suppress_warnings,
TEST_WITH_ASAN,
TEST_WITH_TORCHDYNAMO,
run_tests,
dtype_abbrs,
parametrize
@ -1105,6 +1106,13 @@ class TestMeta(TestCase):
@suppress_warnings
@ops(op_db)
def test_meta_outplace(self, device, dtype, op):
skip_op_names = (
"fft.ihfft",
"fft.ihfft2",
"linalg.lu_solve",
)
if TEST_WITH_TORCHDYNAMO and op.name in skip_op_names:
raise unittest.SkipTest("flaky")
# run the OpInfo sample inputs, cross-referencing them with the
# meta implementation and check the results are the same. All
# the heavy lifting happens in MetaCrossRefFunctionMode

View File

@ -26,6 +26,7 @@ from torch.testing._internal.common_utils import (
parametrize,
run_tests,
skipIfSlowGradcheckEnv,
skipIfTorchDynamo,
subtest,
TestCase,
)
@ -934,6 +935,7 @@ class TestNestedTensorDeviceType(TestCase):
is_cuda = 'cuda' in str(device)
self.assertEqual(nt.is_cuda, is_cuda)
@skipIfTorchDynamo("flaky")
@dtypes(torch.float, torch.float16, torch.double)
def test_nested_tensor_indexing(self, device, dtype):
# edge case: empty nested tensor

View File

@ -34,6 +34,7 @@ from torch.testing._internal.common_utils import (
suppress_warnings,
noncontiguous_like,
TEST_WITH_ASAN,
TEST_WITH_TORCHDYNAMO,
TEST_WITH_UBSAN,
IS_WINDOWS,
IS_FBCODE,
@ -651,6 +652,8 @@ class TestCommon(TestCase):
# - out= with the correct dtype and device, but the wrong shape
@ops(ops_and_refs, dtypes=OpDTypes.none)
def test_out_warning(self, device, op):
if TEST_WITH_TORCHDYNAMO and op.name == "_refs.clamp":
self.skipTest("flaky")
# Prefers running in float32 but has a fallback for the first listed supported dtype
supported_dtypes = op.supported_dtypes(self.device_type)
if len(supported_dtypes) == 0: