From b83e506b31cd3eef40a11fc6a9499ceaa144f601 Mon Sep 17 00:00:00 2001 From: houj04 <35131887+houj04@users.noreply.github.com> Date: Wed, 29 Mar 2023 18:44:23 +0800 Subject: [PATCH] [XPU] fix ut: test_kldiv_loss_op_xpu, test_temporal_shift_op_xpu (#52258) * fix test_kldiv_loss_op_xpu * fix test_temporal_shift_op_xpu --- .../fluid/tests/unittests/xpu/test_kldiv_loss_op_xpu.py | 2 +- .../fluid/tests/unittests/xpu/test_temporal_shift_op_xpu.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/xpu/test_kldiv_loss_op_xpu.py b/python/paddle/fluid/tests/unittests/xpu/test_kldiv_loss_op_xpu.py index d7eb1c50ef9..b3e3d7e5a05 100644 --- a/python/paddle/fluid/tests/unittests/xpu/test_kldiv_loss_op_xpu.py +++ b/python/paddle/fluid/tests/unittests/xpu/test_kldiv_loss_op_xpu.py @@ -80,7 +80,7 @@ class XPUTestKLDivLossOp(XPUOpTestWrapper): ['X'], 'Loss', no_grad_set={"Target"}, - check_eager=True, + check_dygraph=True, ) def initTestCase(self): diff --git a/python/paddle/fluid/tests/unittests/xpu/test_temporal_shift_op_xpu.py b/python/paddle/fluid/tests/unittests/xpu/test_temporal_shift_op_xpu.py index 5af40a0c40f..4a196732650 100644 --- a/python/paddle/fluid/tests/unittests/xpu/test_temporal_shift_op_xpu.py +++ b/python/paddle/fluid/tests/unittests/xpu/test_temporal_shift_op_xpu.py @@ -83,10 +83,10 @@ class XPUTestTemporalShiftOp(XPUOpTestWrapper): self.python_out_sig = ["Out"] def test_check_output(self): - self.check_output(check_dygraph=True) + self.check_output(check_dygraph=False) def test_check_grad(self): - self.check_grad(['X'], 'Out', check_dygraph=True) + self.check_grad(['X'], 'Out', check_dygraph=False) def initTestCase(self): self.x_shape = (6, 4, 4, 4) -- GitLab