Skip to content

Commit 245bf6e

Browse files
dhonnappa-amddnikolaev-amdk-artem
authored
[AUTOGENERATED] [release/2.8] skip convolution tests on Navi4x (#2675)
Cherry-pick of #2055, but changed due to these testcases work on Navi3x as expected, for Navi4x these testcases skipped until support of next kernels will be added: * for test_freeze_conv_relu_fusion_not_forward and test_freeze_conv_relu_fusion: `ConvBinWinogradRxSf2x3g1Fused` * for test_cudnn_convolution_relu: `ConvBinWinogradRxSf2x3g1`, `ConvBinWinogradRxSf2x3g1Fused` and `ConvWinoFuryRxS<2-3>` #SWDEV-555401 --------- Co-authored-by: Dmitry Nikolaev <[email protected]> Co-authored-by: Artem Kuzmitckii <[email protected]>
1 parent dfd386f commit 245bf6e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

test/jit/test_freezing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
from torch.testing._internal.common_quantized import override_quantized_engine
1717
from torch.testing._internal.common_utils import (
1818
raise_on_run_directly,
19+
NAVI4_ARCH,
1920
set_default_dtype,
2021
skipCUDAMemoryLeakCheckIf,
22+
skipIfRocmArch,
2123
skipIfTorchDynamo,
2224
TEST_WITH_ROCM,
2325
)
@@ -2967,6 +2969,7 @@ def test_conv_to_mkldnn_no_mkldnn(self):
29672969
self.assertEqual(frozen(inp), mod(inp))
29682970

29692971
@unittest.skipIf(not (TEST_CUDNN or TEST_WITH_ROCM), "requires CUDNN")
2972+
@skipIfRocmArch(NAVI4_ARCH) # not supported by MIOPEN on NAVI4x
29702973
def test_freeze_conv_relu_fusion(self):
29712974
with set_default_dtype(torch.float):
29722975
conv_bias = [True, False]
@@ -3029,6 +3032,7 @@ def forward(self, x):
30293032
self.assertEqual(mod_eager(inp), frozen_mod(inp))
30303033

30313034
@unittest.skipIf(not (TEST_CUDNN or TEST_WITH_ROCM), "requires CUDNN")
3035+
@skipIfRocmArch(NAVI4_ARCH) # not supported by MIOPEN on NAVI4x
30323036
def test_freeze_conv_relu_fusion_not_forward(self):
30333037
with set_default_dtype(torch.float):
30343038

test/nn/test_convolution.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@
4848
gradgradcheck,
4949
instantiate_parametrized_tests,
5050
MACOS_VERSION,
51+
NAVI4_ARCH,
5152
parametrize as parametrize_test,
5253
run_tests,
5354
set_default_dtype,
5455
skipIfNotMiopenSuggestNHWC,
56+
skipIfRocmArch,
5557
skipIfRocmVersionLessThan,
5658
subtest,
5759
TEST_SCIPY,
@@ -3883,6 +3885,7 @@ def test_conv2d_no_grad(self, device, dtype):
38833885

38843886
@onlyCUDA
38853887
@skipCUDAIfNoCudnn
3888+
@skipIfRocmArch(NAVI4_ARCH) # not supported by MIOPEN on NAVI4x
38863889
@dtypes(torch.float, torch.float16)
38873890
@precisionOverride({torch.half: 0.002, torch.float: 1e-4})
38883891
def test_cudnn_convolution_relu(self, device, dtype):

torch/testing/_internal/common_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5760,4 +5760,4 @@ def wrapper(self, *args, **kwargs):
57605760
setattr(self, member, original_value)
57615761

57625762
return wrapper
5763-
return decorator
5763+
return decorator

0 commit comments

Comments
 (0)