From 14ac700300f44f21e8ae5127261bd6f171928259 Mon Sep 17 00:00:00 2001 From: Jingyue Wu Date: Fri, 6 Sep 2024 22:21:28 -0700 Subject: [PATCH] Refine the tolerances for -np 4. --- tests/cpp/test_multidevice_transformer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cpp/test_multidevice_transformer.cpp b/tests/cpp/test_multidevice_transformer.cpp index 1aa4bcaf27f..1d52226ce6f 100644 --- a/tests/cpp/test_multidevice_transformer.cpp +++ b/tests/cpp/test_multidevice_transformer.cpp @@ -800,7 +800,7 @@ TEST_P(DistributedTransformerTest, MLP_Backward) { expected_outputs, outputs, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1e-5, 1e-5, 1e-5, 1e-5, 0.05, 1e-5, 0.01}); + {1e-5, 0.2, 1e-5, 0.01, 0.2, 0.01, 0.01}); } TEST_P(DistributedTransformerTest, MHA_Backward) { @@ -900,7 +900,7 @@ TEST_P(DistributedTransformerTest, MHA_Backward) { expected_outputs, out, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1e-5, 1e-5, 1e-5, 1e-4, 1e-4, 0.1, 0.1, 0.1, 0.01}); + {1e-5, 0.02, 1e-5, 1e-5, 1e-5, 0.1, 0.1, 0.02, 0.01}); } TEST_P(DistributedTransformerTest, Forward) { @@ -1013,7 +1013,7 @@ TEST_P(DistributedTransformerTest, Forward) { expected_outputs, outputs, {0.0, 0.0, 0.0, 0.0, 0.0}, - {1e-5, 0.01, 0.01, 0.01, 0.02}); + {1e-5, 0.01, 0.01, 0.02, 0.02}); } INSTANTIATE_TEST_SUITE_P(