From 4529d9f40185df989fae986358565dc04cc88fc4 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Thu, 21 Dec 2023 06:28:00 +0000 Subject: [PATCH] [Dy2St] Enable dy2st ut `test_assert` in PIR mode --- test/dygraph_to_static/test_assert.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/dygraph_to_static/test_assert.py b/test/dygraph_to_static/test_assert.py index cd1974bcf5c03..84f154a187dda 100644 --- a/test/dygraph_to_static/test_assert.py +++ b/test/dygraph_to_static/test_assert.py @@ -18,6 +18,7 @@ from dygraph_to_static_utils import ( Dy2StTestBase, enable_to_static_guard, + test_legacy_and_pt_and_pir, ) import paddle @@ -48,6 +49,7 @@ def _run_dy_static(self, func, x, with_exception): self._run(func, x, with_exception, True) self._run(func, x, with_exception, False) + @test_legacy_and_pt_and_pir def test_non_variable(self): self._run_dy_static( paddle.jit.to_static(dyfunc_assert_non_variable), @@ -60,6 +62,7 @@ def test_non_variable(self): with_exception=False, ) + @test_legacy_and_pt_and_pir def test_bool_variable(self): self._run_dy_static( paddle.jit.to_static(dyfunc_assert_variable), @@ -72,6 +75,7 @@ def test_bool_variable(self): with_exception=False, ) + @test_legacy_and_pt_and_pir def test_int_variable(self): self._run_dy_static( paddle.jit.to_static(dyfunc_assert_variable),