Skip to content

Commit 71d3b06

Browse files
authored
fix unittest of conv2d due to V100 do not support bfloat16 (#42496)
1 parent e052fde commit 71d3b06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/paddle/fluid/tests/unittests/test_conv2d_op.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ def test_check_grad_no_input(self):
172172

173173
def create_test_cudnn_bf16_class(parent):
174174
@unittest.skipIf(
175-
not core.is_compiled_with_cuda() or core.cudnn_version() < 8100,
176-
"core is not compiled with CUDA and cudnn version need larger than 8.1.0"
177-
)
175+
not core.is_compiled_with_cuda() or
176+
not core.is_bfloat16_supported(core.CUDAPlace(0)),
177+
"core is not compiled with CUDA and do not support bfloat16")
178178
class TestConv2DCUDNNBF16(parent):
179179
def get_numeric_grad(self, place, check_name):
180180
scope = core.Scope()

0 commit comments

Comments
 (0)