未验证 提交 69b5d74d 编写于 作者: L Leo Chen 提交者: GitHub

skip bf16 test if not supported (#42503)

上级 09a13294
......@@ -1254,9 +1254,8 @@ class TestBf16(unittest.TestCase):
def test_bf16(self):
def func_isinstance():
if fluid.core.is_compiled_with_cuda():
cudnn_version = paddle.device.get_cudnn_version()
if cudnn_version is not None and cudnn_version >= 8100:
if fluid.core.is_compiled_with_cuda(
) and fluid.core.is_bfloat16_supported(paddle.CUDAPlace(0)):
out_fp32 = self.train(enable_amp=False)
out_bf16_O1 = self.train(enable_amp=True, amp_level='O1')
out_bf16_O2 = self.train(enable_amp=True, amp_level='O2')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册