Skip to content

Commit

Permalink
fix ci coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Asthestarsfalll committed Jul 24, 2023
1 parent 5c50cfe commit 0920620
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/ir/new_ir/test_special_op_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,19 @@ def test_normal_attribute(self):
_ = paddle.fluid.core.translate_newirprogram(main_program.desc)


class TestArgmaxOpTranscriber(unittest.TestCase):
def test_op(self):
place = core.Place()
place.set_place(paddle.CPUPlace())
new_scope = paddle.static.Scope()
main_program = paddle.static.Program()
with paddle.static.scope_guard(new_scope):
with paddle.static.program_guard(main_program):
x = paddle.to_tensor([2, 3, 4], 'float64')
y = paddle.argmax(x)

_ = paddle.fluid.core.translate_newirprogram(main_program.desc)


if __name__ == "__main__":
unittest.main()

0 comments on commit 0920620

Please sign in to comment.