diff --git a/test/deprecated/legacy_test/CMakeLists.txt b/test/deprecated/legacy_test/CMakeLists.txt index e6bc75b07828c9..88680d073d4944 100644 --- a/test/deprecated/legacy_test/CMakeLists.txt +++ b/test/deprecated/legacy_test/CMakeLists.txt @@ -468,7 +468,6 @@ endif() foreach(TEST_OP ${TEST_OPS}) py_test_modules(${TEST_OP} MODULES ${TEST_OP}) endforeach() -set_tests_properties(test_logcumsumexp_op PROPERTIES TIMEOUT 30) py_test_modules( test_imperative_ocr_attention_model MODULES diff --git a/test/legacy_test/CMakeLists.txt b/test/legacy_test/CMakeLists.txt index 053b0da2fc4e55..fbc54ac798953a 100644 --- a/test/legacy_test/CMakeLists.txt +++ b/test/legacy_test/CMakeLists.txt @@ -534,6 +534,7 @@ endif() foreach(TEST_OP ${TEST_OPS}) py_test_modules(${TEST_OP} MODULES ${TEST_OP}) endforeach() +set_tests_properties(test_logcumsumexp_op PROPERTIES TIMEOUT 30) if(WITH_GPU OR WITH_XPU OR WITH_ASCEND diff --git a/test/deprecated/legacy_test/test_logcumsumexp_op.py b/test/legacy_test/test_logcumsumexp_op.py similarity index 97% rename from test/deprecated/legacy_test/test_logcumsumexp_op.py rename to test/legacy_test/test_logcumsumexp_op.py index 75d13cba17264b..a1db971001a83c 100644 --- a/test/deprecated/legacy_test/test_logcumsumexp_op.py +++ b/test/legacy_test/test_logcumsumexp_op.py @@ -201,10 +201,11 @@ def test_gpu(self): def test_name(self): paddle.enable_static() - with base.program_guard(base.Program()): - x = paddle.static.data('x', [3, 4]) - y = paddle.logcumsumexp(x, name='out') - self.assertTrue('out' in y.name) + with paddle.pir_utils.OldIrGuard(): + with base.program_guard(base.Program()): + x = paddle.static.data('x', [3, 4]) + y = paddle.logcumsumexp(x, name='out') + self.assertTrue('out' in y.name) paddle.disable_static() @test_with_pir_api