[Mlir-commits] [mlir] [mlir][python] Fix how the mlir variadic Python accessor `_ods_equally_sized_accessor` is used (#101132) (PR #106003)

Kasper Nielsen llvmlistbot at llvm.org
Thu Aug 29 13:26:55 PDT 2024


================
@@ -208,3 +209,70 @@ class TestOp(OpView):
 
 
 run(testOdsBuildDefaultCastError)
+
+
+def testOdsEquallySizedAccessor():
+    class TestOpMultiResultSegments(OpView):
+        OPERATION_NAME = "custom.test_op"
+        _ODS_REGIONS = (1, True)
----------------
kasper0406 wrote:

I didn't consider it, but I think it is a good idea.
It seems like `SameVariadicResultSize` (and `SameVariadicOperandSize`) are traits defined in `OpBase.td`. However, from what I saw from quickly inspecting `mlir/lib/Bindings/Python`, I do not think the traits are currently exposed through the Python API.
Am I missing something?

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


More information about the Mlir-commits mailing list