markDynamoStrictTest some more tests (#115857)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/115857
Approved by: https://github.com/voznesenskym
ghstack dependencies: #115845, #115855, #115856
This commit is contained in:
rzou
2023-12-14 11:00:06 -08:00
committed by PyTorch MergeBot
parent 3477a2ee03
commit 8ddca5aeae
4 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,7 @@ if TEST_CUDA:
_cycles_per_ms = None _cycles_per_ms = None
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestCuda(TestCase): class TestCuda(TestCase):
_do_cuda_memory_leak_check = True _do_cuda_memory_leak_check = True
_do_cuda_non_default_stream = True _do_cuda_non_default_stream = True
@ -3401,6 +3402,7 @@ exit(2)
self.assertEqual(rc, "0") self.assertEqual(rc, "0")
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestCudaMallocAsync(TestCase): class TestCudaMallocAsync(TestCase):
@unittest.skipIf(TEST_CUDAMALLOCASYNC, "setContextRecorder not supported by CUDAMallocAsync") @unittest.skipIf(TEST_CUDAMALLOCASYNC, "setContextRecorder not supported by CUDAMallocAsync")
def test_memory_snapshot(self): def test_memory_snapshot(self):
@ -3897,6 +3899,7 @@ def reconstruct_from_tensor_metadata(metadata):
@unittest.skipIf(TEST_CUDAMALLOCASYNC or TEST_WITH_ROCM, "NYI") @unittest.skipIf(TEST_CUDAMALLOCASYNC or TEST_WITH_ROCM, "NYI")
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestBlockStateAbsorption(TestCase): class TestBlockStateAbsorption(TestCase):
def checkCheckpointedBlock(self, before_block, after_block): def checkCheckpointedBlock(self, before_block, after_block):

View File

@ -25,6 +25,7 @@ with patch.dict(os.environ, {"PYTORCH_NVML_BASED_CUDA_CHECK": "1"}):
TestCase = NoTest # type: ignore[misc, assignment] # noqa: F811 TestCase = NoTest # type: ignore[misc, assignment] # noqa: F811
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestExtendedCUDAIsAvail(TestCase): class TestExtendedCUDAIsAvail(TestCase):
SUBPROCESS_REMINDER_MSG = ( SUBPROCESS_REMINDER_MSG = (
"\n REMINDER: Tests defined in test_cuda_nvml_based_avail.py must be run in a process " "\n REMINDER: Tests defined in test_cuda_nvml_based_avail.py must be run in a process "
@ -65,6 +66,7 @@ class TestExtendedCUDAIsAvail(TestCase):
assert in_bad_fork assert in_bad_fork
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestVisibleDeviceParses(TestCase): class TestVisibleDeviceParses(TestCase):
def test_env_var_parsing(self): def test_env_var_parsing(self):

View File

@ -13,6 +13,7 @@ if not TEST_CUDA:
TestCase = NoTest # noqa: F811 TestCase = NoTest # noqa: F811
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestCudaPrimaryCtx(TestCase): class TestCudaPrimaryCtx(TestCase):
CTX_ALREADY_CREATED_ERR_MSG = ( CTX_ALREADY_CREATED_ERR_MSG = (
"Tests defined in test_cuda_primary_ctx.py must be run in a process " "Tests defined in test_cuda_primary_ctx.py must be run in a process "

View File

@ -16,6 +16,7 @@ if not TEST_CUDA:
TestCase = NoTest # noqa: F811 TestCase = NoTest # noqa: F811
@torch.testing._internal.common_utils.markDynamoStrictTest
class TestCudaTrace(TestCase): class TestCudaTrace(TestCase):
def setUp(self): def setUp(self):
torch._C._activate_cuda_trace() torch._C._activate_cuda_trace()