From 2cc3ba1ca275210235dbb7e7e5264dbd05010880 Mon Sep 17 00:00:00 2001 From: cyber-pioneer Date: Wed, 10 Jan 2024 09:16:08 +0000 Subject: [PATCH] fix atol --- test/legacy_test/CMakeLists.txt | 4 ++-- test/legacy_test/test_batch_norm_op_prim_nchw.py | 12 ++++++------ test/legacy_test/test_batch_norm_op_prim_nhwc.py | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/legacy_test/CMakeLists.txt b/test/legacy_test/CMakeLists.txt index 2d3116d5ad69b1..54f53471ffc9d6 100644 --- a/test/legacy_test/CMakeLists.txt +++ b/test/legacy_test/CMakeLists.txt @@ -995,8 +995,8 @@ else() set_tests_properties(test_conv3d_transpose_part2_op PROPERTIES TIMEOUT 120) set_tests_properties(test_conv3d_op PROPERTIES TIMEOUT 120) set_tests_properties(test_norm_op PROPERTIES TIMEOUT 150) - set_tests_properties(test_batch_norm_op_prim_nchw PROPERTIES TIMEOUT 250) - set_tests_properties(test_batch_norm_op_prim_nhwc PROPERTIES TIMEOUT 250) + set_tests_properties(test_batch_norm_op_prim_nchw PROPERTIES TIMEOUT 300) + set_tests_properties(test_batch_norm_op_prim_nhwc PROPERTIES TIMEOUT 300) set_tests_properties(test_layer_norm_op PROPERTIES TIMEOUT 250) set_tests_properties(test_pool3d_op PROPERTIES TIMEOUT 150) endif() diff --git a/test/legacy_test/test_batch_norm_op_prim_nchw.py b/test/legacy_test/test_batch_norm_op_prim_nchw.py index 4f4f6a4928e24d..b152d4c17322f8 100644 --- a/test/legacy_test/test_batch_norm_op_prim_nchw.py +++ b/test/legacy_test/test_batch_norm_op_prim_nchw.py @@ -331,12 +331,12 @@ def initConfig(self): ) class TestBatchNormOpNCHWbf16(TestBatchNormOp): def initConfig(self): - self.fw_comp_atol = 1e-3 - self.fw_comp_rtol = 1e-3 - self.rev_comp_atol = 1e-3 - self.rev_comp_rtol = 1e-3 - self.cinn_atol = 1e-3 - self.cinn_rtol = 1e-3 + self.fw_comp_atol = 2e-3 + self.fw_comp_rtol = 2e-3 + self.rev_comp_atol = 2e-3 + self.rev_comp_rtol = 2e-3 + self.cinn_atol = 2e-3 + self.cinn_rtol = 2e-3 self.dtype = "uint16" self.shape = [16, 16, 16, 8] self.training = True diff --git a/test/legacy_test/test_batch_norm_op_prim_nhwc.py b/test/legacy_test/test_batch_norm_op_prim_nhwc.py index 270d8dbeab4eee..c421fdf803cbd5 100644 --- a/test/legacy_test/test_batch_norm_op_prim_nhwc.py +++ b/test/legacy_test/test_batch_norm_op_prim_nhwc.py @@ -148,12 +148,12 @@ def initConfig(self): ) class TestBatchNormOpNHWCbf16(TestBatchNormOp): def initConfig(self): - self.fw_comp_atol = 1e-3 - self.fw_comp_rtol = 1e-3 - self.rev_comp_atol = 1e-3 - self.rev_comp_rtol = 1e-3 - self.cinn_atol = 1e-3 - self.cinn_rtol = 1e-3 + self.fw_comp_atol = 2e-3 + self.fw_comp_rtol = 2e-3 + self.rev_comp_atol = 2e-3 + self.rev_comp_rtol = 2e-3 + self.cinn_atol = 2e-3 + self.cinn_rtol = 2e-3 self.dtype = "uint16" self.shape = [16, 16, 16, 8] self.training = True