From fa07857a4af681e54b546e2032e56d0322e36681 Mon Sep 17 00:00:00 2001 From: Guoxia Wang Date: Wed, 29 Mar 2023 10:53:11 +0800 Subject: [PATCH] [AMP OP&Test] update bf16 atol=0.1 to atol=0.02 (#52121) --- python/paddle/fluid/tests/unittests/test_layer_norm_op.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/test_layer_norm_op.py b/python/paddle/fluid/tests/unittests/test_layer_norm_op.py index 4c5c622a2c2..a43c3ebcd0d 100644 --- a/python/paddle/fluid/tests/unittests/test_layer_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_layer_norm_op.py @@ -472,7 +472,7 @@ class TestBF16ScaleBiasLayerNorm(unittest.TestCase): ) def assert_equal(x, y): - np.testing.assert_allclose(x, y, rtol=1e-05, atol=0.1) + np.testing.assert_allclose(x, y, rtol=1e-05, atol=3e-2) assert_equal(y_np_1, y_np_2) assert_equal(x_g_np_1, x_g_np_2) -- GitLab