[llvm] [mlir][vector] More BAZEL fixes (PR #67005)

Nicolas Vasilache via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 04:52:20 PDT 2023


https://github.com/nicolasvasilache created https://github.com/llvm/llvm-project/pull/67005

None

>From 3f30aebced4e856d3c5352f244a5b0055d261800 Mon Sep 17 00:00:00 2001
From: Nicolas Vasilache <nicolasvasilache at users.noreply.github.com>
Date: Thu, 21 Sep 2023 12:09:38 +0200
Subject: [PATCH] [mlir][vector] More BAZEL fixes

---
 mlir/python/mlir/dialects/VectorAttributes.td | 14 +++++++++
 .../mlir/python/BUILD.bazel                   | 30 +++++++++++++++----
 2 files changed, 39 insertions(+), 5 deletions(-)
 create mode 100644 mlir/python/mlir/dialects/VectorAttributes.td

diff --git a/mlir/python/mlir/dialects/VectorAttributes.td b/mlir/python/mlir/dialects/VectorAttributes.td
new file mode 100644
index 000000000000000..33132fd505d004d
--- /dev/null
+++ b/mlir/python/mlir/dialects/VectorAttributes.td
@@ -0,0 +1,14 @@
+//===-- VectorAttributes.td - Entry point VectorAttr bind --*- tablegen -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef PYTHON_BINDINGS_VECTOR_ATTRIBUTES
+#define PYTHON_BINDINGS_VECTOR_ATTRIBUTES
+
+include "mlir/Dialect/Vector/IR/VectorAttributes.td"
+
+#endif
diff --git a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
index 8d5e921fa6b01dc..5434a5b4660765f 100644
--- a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
@@ -1353,21 +1353,41 @@ gentbl_filegroup(
     tbl_outs = [
         (
             [
-                "-gen-python-enum-bindings",
+                "-gen-python-op-bindings",
                 "-bind-dialect=vector",
             ],
-            "mlir/dialects/_vector_enum_gen.py",
+            "mlir/dialects/_vector_ops_gen.py",
         ),
+    ],
+    tblgen = "//mlir:mlir-tblgen",
+    td_file = "mlir/dialects/VectorOps.td",
+    deps = [
+        "//mlir:ArithOpsTdFiles",
+        "//mlir:OpBaseTdFiles",
+        "//mlir:VectorOpsTdFiles",
+    ],
+)
+
+gentbl_filegroup(
+    name = "VectorAttributesPyGen",
+    tbl_outs = [
         (
             [
-                "-gen-python-op-bindings",
+                "-gen-python-enum-bindings",
                 "-bind-dialect=vector",
             ],
-            "mlir/dialects/_vector_ops_gen.py",
+            "mlir/dialects/_vector_enum_gen.py",
         ),
+        # (
+        #     [
+        #         "-gen-python-attri-bindings",
+        #         "-bind-dialect=vector",
+        #     ],
+        #     "mlir/dialects/_vector_attribute_gen.py",
+        # ),
     ],
     tblgen = "//mlir:mlir-tblgen",
-    td_file = "mlir/dialects/VectorOps.td",
+    td_file = "mlir/dialects/VectorAttributes.td",
     deps = [
         "//mlir:ArithOpsTdFiles",
         "//mlir:OpBaseTdFiles",



More information about the llvm-commits mailing list