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

Maksim Levental llvmlistbot at llvm.org
Wed Oct 8 20:54:29 PDT 2025


================
@@ -981,6 +981,38 @@ filegroup(
     ],
 )
 
+##---------------------------------------------------------------------------##
+# Shard dialect.
+##---------------------------------------------------------------------------##
+
+gentbl_filegroup(
+    name = "ShardOpsPyGen",
+    tbl_outs = {
+        "mlir/dialects/_shard_enum_gen.py": [
+            "-gen-python-enum-bindings",
+            "-bind-dialect=shard",
+        ],
+        "mlir/dialects/_shard_ops_gen.py": [
+            "-gen-python-op-bindings",
+            "-bind-dialect=shard",
+        ],
+    },
+    tblgen = "//mlir:mlir-tblgen",
+    td_file = "mlir/dialects/ShardOps.td",
+    deps = [
+        "//mlir:OpBaseTdFiles",
+        "//mlir:ShardTdFiles",
+    ],
+)
+
+filegroup(
+    name = "ShardOpsPyFiles",
+    srcs = [
+        "mlir/dialects/shard.py",
+        ":ShardOpsPyGen",
+    ],
+)
----------------
makslevental wrote:

unless you work at Google (or you really actually do use bazel) you don't need to do this (bazel build is maintained by the users that actually use bazel)

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


More information about the Mlir-commits mailing list