From ada6e43ad4670138d17ec881fb631caa2fbf3d49 Mon Sep 17 00:00:00 2001 From: lishicheng1996 <847223866@qq.com> Date: Thu, 15 Jun 2023 10:27:49 +0800 Subject: [PATCH] some unittest cases doesn't have kernels on ROCm --- test/legacy_test/test_layer_norm_op.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/legacy_test/test_layer_norm_op.py b/test/legacy_test/test_layer_norm_op.py index c684a26626708..0aa980f6715ef 100644 --- a/test/legacy_test/test_layer_norm_op.py +++ b/test/legacy_test/test_layer_norm_op.py @@ -126,6 +126,10 @@ def layer_norm_wrapper( ) +@unittest.skipIf( + paddle.is_compiled_with_rocm(), + "ROCm doesn't support fp64 LayerNormOpByOp currently", +) class TestLayerNormOpByOpTest(OpTest): def setUp(self): self.python_api = layer_norm_wrapper @@ -165,7 +169,7 @@ def initConfig(self): self.max_relative_error = 1e-5 # ROCm does not have float64 LayerNorm kernel - self.dtype = "float32" if paddle.is_compiled_with_rocm() else "float64" + self.dtype = "float64" self.x_shape = [2, 6, 6, 3] self.epsilon = 0.00001 self.begin_norm_axis = 1