markDynamoStrictTest some test_cpp_extensions.* (#115858)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/115858
Approved by: https://github.com/voznesenskym
ghstack dependencies: #115845, #115855, #115856, #115857
This commit is contained in:
rzou
2023-12-14 11:00:12 -08:00
committed by PyTorch MergeBot
parent 8ddca5aeae
commit 85262b0a9e
5 changed files with 15 additions and 1 deletions

View File

@ -3,6 +3,7 @@
import os
import torch
import torch.testing._internal.common_utils as common
import torch.testing._internal.common_nn as common_nn
from cpp_api_parity.parity_table_parser import parse_parity_tracker_table
@ -18,6 +19,7 @@ PARITY_TABLE_PATH = os.path.join(os.path.dirname(__file__), 'cpp_api_parity', 'p
parity_table = parse_parity_tracker_table(PARITY_TABLE_PATH)
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestCppApiParity(common.TestCase):
module_test_params_map = {}
functional_test_params_map = {}

View File

@ -37,6 +37,7 @@ except ImportError as e:
) from e
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestCppExtensionAOT(common.TestCase):
"""Tests ahead-of-time cpp extensions
@ -150,6 +151,7 @@ class TestCppExtensionAOT(common.TestCase):
self.assertEqual(test, ref)
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestPybindTypeCasters(common.TestCase):
"""Pybind tests for ahead-of-time cpp extensions
@ -243,6 +245,7 @@ class TestPybindTypeCasters(common.TestCase):
self.check_union(funcs)
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestORTTensor(common.TestCase):
def test_unregistered(self):
a = torch.arange(0, 10, device='cpu')
@ -294,6 +297,7 @@ class TestORTTensor(common.TestCase):
self.assertEqual(grad[0].shape, input.shape)
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestRNGExtension(common.TestCase):
def setUp(self):
@ -330,6 +334,7 @@ class TestRNGExtension(common.TestCase):
self.assertEqual(rng_extension.getInstanceCount(), 0)
@torch.testing._internal.common_utils.markDynamoStrictTest
@unittest.skipIf(not TEST_CUDA, "CUDA not found")
class TestTorchLibrary(common.TestCase):

View File

@ -40,6 +40,7 @@ def remove_build_path():
# There's only one test that runs gracheck, run slow mode manually
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestCppExtensionJIT(common.TestCase):
"""Tests just-in-time cpp extensions.
Don't confuse this with the PyTorch JIT (aka TorchScript).

View File

@ -51,6 +51,7 @@ class DummyModule:
return 0
@unittest.skipIf(IS_ARM64, "Does not work on arm")
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestCppExtensionOpenRgistration(common.TestCase):
"""Tests Open Device Registration with C++ extensions.
"""

View File

@ -2,4 +2,9 @@
# when run under PYTORCH_TEST_WITH_DYNAMO=1.
#
# This lists exists so we can more easily add large numbers of failing tests,
dynamo_expected_failures = {}
dynamo_expected_failures = {
"TestCppExtensionJIT.test_cpp_frontend_module_has_up_to_date_attribute",
"TestCppExtensionJIT.test_custom_compound_op_autograd",
"TestCppExtensionJIT.test_cpp_frontend_module_has_up_to_date_attributes",
"TestCppExtensionOpenRgistration.test_open_device_registration",
}