[llvm] [mlir] Add shard Dialect Python Bindings (PR #162578)

Siavash Nazari via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 8 21:54:58 PDT 2025


================
@@ -0,0 +1,25 @@
+#  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 ._shard_ops_gen import *
+from ._shard_ops_gen import _Dialect
+from ._shard_enum_gen import *
+
+try:
+    from ..ir import *
+    from ._ods_common import (
+        get_default_loc_context as _get_default_loc_context,
+        _cext as _ods_cext,
+        get_op_result_or_op_results as _get_op_result_or_op_results,
+    )
+
+    from typing import Any, List, Union
+except ImportError as e:
+    raise RuntimeError("Error loading imports from extension module") from e
+
+
+# The shard dialect currently doesn't need custom Python implementations for its operations
+# like the arith dialect does for ConstantOp. Most operations can use the generated bindings.
+# If specialized Python methods are needed for specific operations in the future,
+# they can be added here using the @_ods_cext.register_operation decorator pattern.
----------------
Svoch wrote:

Removed.

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


More information about the llvm-commits mailing list