From fa44ea5cf2988cd28605aedfb5f2002a63018df7 Mon Sep 17 00:00:00 2001 From: cyber-pioneer <116002591+cyber-pioneer@users.noreply.github.com> Date: Mon, 26 Jun 2023 18:59:45 +0800 Subject: [PATCH] test case of batch_norm support cinn when training mode and nchw (#54862) --- test/legacy_test/test_batch_norm_op_prim_nchw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d343231e6a3..9d11d264908 100644 --- a/test/legacy_test/test_batch_norm_op_prim_nchw.py +++ b/test/legacy_test/test_batch_norm_op_prim_nchw.py @@ -108,7 +108,7 @@ class TestBatchNormOp(OpTest): ) def test_check_grad_scale_bias(self): - if self.data_format == "NCHW": + if self.data_format == "NCHW" and self.training is False: self.enable_cinn = False if self.dtype == "float32": self.rev_comp_atol = 1e-3 -- GitLab