Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PIR] Open pir tests for cond/if op #61455

Merged
merged 4 commits into from
Feb 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions test/dygraph_to_static/test_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
Dy2StTestBase,
enable_to_static_guard,
test_ast_only,
test_legacy_and_pt_and_pir,
test_legacy_only,
)
from ifelse_simple_func import dyfunc_with_if_else

import paddle
from paddle.base import core
from paddle.jit.dy2static.utils import Dygraph2StaticException
from paddle.pir_utils import test_with_pir_api

SEED = 2020
np.random.seed(SEED)
Expand Down Expand Up @@ -279,7 +279,7 @@ def _test_value_impl(self):
self.assertEqual(dygraph_res, static_res)

@test_ast_only
@test_with_pir_api
@test_legacy_and_pt_and_pir
def test_transformed_static_result(self):
self.init_dygraph_func()
if hasattr(self, "error"):
Expand Down Expand Up @@ -326,8 +326,7 @@ def _test_value_impl(self):
else:
self.assertEqual(dygraph_res, static_res)

# Why add test_legacy_only? : PIR not support if true and false branch output with different dtype
@test_legacy_only
@test_legacy_and_pt_and_pir
@test_ast_only
def test_transformed_static_result(self):
self.init_dygraph_func()
Expand Down Expand Up @@ -429,8 +428,7 @@ def _test_value_impl(self):
else:
self.assertEqual(dygraph_res, static_res)

# Why add test_legacy_only? : PIR not support if true and false branch output with different dtype
@test_legacy_only
@test_legacy_and_pt_and_pir
@test_ast_only
def test_transformed_static_result(self):
self.init_dygraph_func()
Expand Down