Skip to content

Commit

Permalink
some unittest cases doesn't have kernels on ROCm
Browse files Browse the repository at this point in the history
  • Loading branch information
lishicheng1996 committed Jun 26, 2023
1 parent d398a0f commit ada6e43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/legacy_test/test_layer_norm_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ada6e43

Please sign in to comment.