We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7f1b13 commit 1d8a684Copy full SHA for 1d8a684
test/legacy_test/test_math_op_patch_pir.py
@@ -703,6 +703,18 @@ def test_builtin_type_conversion(self):
703
with self.assertRaises(TypeError):
704
complex(x)
705
706
+ def test_builtin_type_conversion_old_ir(self):
707
+ with paddle.pir_utils.DygraphOldIrGuard():
708
+ _, _, program_guard = new_program()
709
+ with program_guard:
710
+ x = paddle.static.data(name='x', shape=[], dtype="float32")
711
+ with self.assertRaises(TypeError):
712
+ int(x)
713
714
+ float(x)
715
716
+ complex(x)
717
+
718
def test_math_exists(self):
719
with paddle.pir_utils.IrGuard():
720
a = paddle.static.data(name='a', shape=[1], dtype='float32')
0 commit comments