[Mlir-commits] [mlir] [MLIR][Python] Add python bindings for IRDL	dialect (PR #158488)
    Maksim Levental 
    llvmlistbot at llvm.org
       
    Wed Sep 17 19:59:11 PDT 2025
    
    
  
================
@@ -0,0 +1,74 @@
+#  Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+#  See https://llvm.org/LICENSE.txt for license information.
+#  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+from ._irdl_ops_gen import *
+from ._irdl_ops_gen import _Dialect
+from ._irdl_enum_gen import *
+from .._mlir_libs._mlirDialectsIRDL import *
+from ..ir import register_attribute_builder
+from ._ods_common import (
+    get_op_result_or_value as _get_value,
+    get_op_results_or_values as _get_values,
+    _cext as _ods_cext,
+)
+from ..extras.meta import region_op
+
+
+ at _ods_cext.register_operation(_Dialect, replace=True)
+class DialectOp(DialectOp):
+    """Specialization for the dialect op class."""
+
+    def __init__(self, sym_name, *, loc=None, ip=None):
----------------
makslevental wrote:
Pipes syntax was introduced in 3.9 so better to use `Union`.
https://github.com/llvm/llvm-project/pull/158488
    
    
More information about the Mlir-commits
mailing list