Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/jit/test_freezing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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):

Expand Down
3 changes: 3 additions & 0 deletions test/nn/test_convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down