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] D-7、D-10 Adapt test_errors #61963

Merged
merged 3 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 4 additions & 1 deletion test/legacy_test/test_cumsum_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,12 @@ def test_check_grad(self):


class BadInputTest(unittest.TestCase):
@test_with_pir_api
def test_error(self):
paddle.enable_static()
with base.program_guard(base.Program()):
with paddle.static.program_guard(
paddle.static.Program(), paddle.static.Program()
):

def test_bad_x():
data = [1, 2, 4]
Expand Down
5 changes: 5 additions & 0 deletions test/legacy_test/test_pad_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ def test_check_grad_normal(self):
create_test_fp16(TestCase3)


@unittest.skipIf(
0x45f marked this conversation as resolved.
Show resolved Hide resolved
core.is_compiled_with_cuda(),
"core is compiled with CUDA and not support the float16",
)
class TestPadOpError(unittest.TestCase):
@test_with_pir_api
def test_errors(self):
with static_guard():
with paddle.static.program_guard(
Expand Down