[Mlir-commits] [mlir] [mlir][python] fix `replace=True` for `register_operation` and `register_type_caster` (PR #70264)

Jacques Pienaar llvmlistbot at llvm.org
Mon Oct 30 12:41:37 PDT 2023


================
@@ -668,6 +671,27 @@ def testKnownOpView():
         # CHECK: OpView object
         print(repr(custom))
 
+        # constant should map to an extension OpView class in the arithmetic dialect.
+        constant = module.body.operations[3]
+        # CHECK: <mlir.dialects.arith.ConstantOp object
+        print(repr(constant))
+        # CHECK: literal value 0
+        print("literal value", constant.literal_value)
----------------
jpienaar wrote:

Should these be comments in the file? I take these comments as to explaining what is being tested, which seems useful in the checked in test too.

https://github.com/llvm/llvm-project/pull/70264


More information about the Mlir-commits mailing list