diff --git a/test/jit/test_freezing.py b/test/jit/test_freezing.py index 8258124680b47..626b9412a7b4e 100644 --- a/test/jit/test_freezing.py +++ b/test/jit/test_freezing.py @@ -16,8 +16,10 @@ from torch.testing._internal.common_quantized import override_quantized_engine from torch.testing._internal.common_utils import ( raise_on_run_directly, + NAVI4_ARCH, set_default_dtype, skipCUDAMemoryLeakCheckIf, + skipIfRocmArch, skipIfTorchDynamo, TEST_WITH_ROCM, ) @@ -2967,6 +2969,7 @@ def test_conv_to_mkldnn_no_mkldnn(self): self.assertEqual(frozen(inp), mod(inp)) @unittest.skipIf(not (TEST_CUDNN or TEST_WITH_ROCM), "requires CUDNN") + @skipIfRocmArch(NAVI4_ARCH) # not supported by MIOPEN on NAVI4x def test_freeze_conv_relu_fusion(self): with set_default_dtype(torch.float): conv_bias = [True, False] @@ -3029,6 +3032,7 @@ def forward(self, x): self.assertEqual(mod_eager(inp), frozen_mod(inp)) @unittest.skipIf(not (TEST_CUDNN or TEST_WITH_ROCM), "requires CUDNN") + @skipIfRocmArch(NAVI4_ARCH) # not supported by MIOPEN on NAVI4x def test_freeze_conv_relu_fusion_not_forward(self): with set_default_dtype(torch.float): diff --git a/test/nn/test_convolution.py b/test/nn/test_convolution.py index b12c99e74686d..7dacfeed003cc 100644 --- a/test/nn/test_convolution.py +++ b/test/nn/test_convolution.py @@ -48,10 +48,12 @@ gradgradcheck, instantiate_parametrized_tests, MACOS_VERSION, + NAVI4_ARCH, parametrize as parametrize_test, run_tests, set_default_dtype, skipIfNotMiopenSuggestNHWC, + skipIfRocmArch, skipIfRocmVersionLessThan, subtest, TEST_SCIPY, @@ -3874,6 +3876,7 @@ def test_conv2d_no_grad(self, device, dtype): @onlyCUDA @skipCUDAIfNoCudnn + @skipIfRocmArch(NAVI4_ARCH) # not supported by MIOPEN on NAVI4x @dtypes(torch.float, torch.float16) @precisionOverride({torch.half: 0.002, torch.float: 1e-4}) def test_cudnn_convolution_relu(self, device, dtype):