Skip to content

Commit 4eaa5bf

Browse files
[rocm7.0_internal_testing] skip 3D NCHW FP16 batchnorm test due to Native accuracy issue (#2370)
Skip for `test_nn.py::TestNN.test_batchnorm_3D_train_NCHW_vs_native_mixed_float16` Test failed on `weight gradient` comparison MIOpen/CuDNN vs Native batchnorm. But CPU test `test_batchnorm_3D_train_NCHW_vs_cpu_mixed_float16` passed. It looks like FP16 Native batchnorm issue. Failed on MI200/MI300 and V100 It passed somehow on Navi (with enabled MIOpen) Fixes SWDEV-541024, SWDEV-539171 ``` python test_nn.py -v -k test_batchnorm_3D_train_NCHW_vs_native_mixed_float16 test_batchnorm_3D_train_NCHW_vs_native_mixed_float16 (__main__.TestNN) ... skipped '3D float16 NCHW train failed on CUDA and ROCm due to Native batchnorm accuracy issue SWDEV-541024' OK (skipped=1) ```
1 parent 89423f3 commit 4eaa5bf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/test_nn.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5179,6 +5179,8 @@ def test_batchnorm_nhwc_cuda(self):
51795179
name_fn=lambda f, b, m, t: f"{f}_vs_{b}{'_mixed' if m else ''}_{dtype_name(t)}"
51805180
)
51815181
def test_batchnorm(self, dims, mode, memory_format, ref_backend, mixed, dtype):
5182+
if self._testMethodName == "test_batchnorm_3D_train_NCHW_vs_native_mixed_float16":
5183+
self.skipTest("3D float16 NCHW train failed on CUDA and ROCm due to Native batchnorm accuracy issue SWDEV-541024")
51825184
if torch.version.hip:
51835185
if self._testMethodName in ("test_batchnorm_2D_train_NHWC_vs_NCHW_mixed_bfloat16",
51845186
"test_batchnorm_2D_train_NCHW_vs_cpu_mixed_bfloat16",
@@ -5194,10 +5196,6 @@ def test_batchnorm(self, dims, mode, memory_format, ref_backend, mixed, dtype):
51945196
) and _get_torch_rocm_version() >= (6, 4):
51955197
self.skipTest("bfloat16 NCHW train failed due to native tolerance issue SWDEV-507600")
51965198

5197-
if self._testMethodName == "test_batchnorm_3D_train_NCHW_vs_native_mixed_float16" \
5198-
and _get_torch_rocm_version() < (6, 4):
5199-
self.skipTest("3D float16 NCHW train failed on ROCm<=6.3 ")
5200-
52015199
if dims == 3 and memory_format in ("NHWC", "NCHW"):
52025200
memory_format = memory_format + "3D"
52035201

0 commit comments

Comments
 (0)