[llvm] [Affine][Bazel] Added AffineOps to BUILD.bazel file (PR #68842)

Balaji V. Iyer. via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 18:27:17 PDT 2023


https://github.com/bviyer created https://github.com/llvm/llvm-project/pull/68842

Added AffineOps and correct dependencies to the BUILD.bazel file.

>From 85d654e2eb31768c89fc73857592dfa10ad54c83 Mon Sep 17 00:00:00 2001
From: "Balaji V. Iyer" <bviyer at gmail.com>
Date: Thu, 12 Oct 2023 01:23:19 +0000
Subject: [PATCH] [Affine][Bazel] Added AffineOps to BUILD.bazel file

    Added AffineOps and correct dependencies to the BUILD.bazel file.
---
 .../mlir/python/BUILD.bazel                   | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
index 949bfa4fbda3a6c..159957360c91bfb 100644
--- a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
@@ -82,6 +82,50 @@ filegroup(
     ]),
 )
 
+##---------------------------------------------------------------------------##
+# Affine dialect.
+##---------------------------------------------------------------------------##
+
+td_library(
+    name = "AffineOpsPyTdFiles",
+    srcs = [
+        "mlir/dialects/AffineOps.td",
+    ],
+    deps = [
+        "//mlir:AffineOpsTdFiles",
+        "//mlir:FunctionInterfacesTdFiles",
+        "//mlir:OpBaseTdFiles",
+    ],
+)
+
+gentbl_filegroup(
+    name = "AffineOpsPyGen",
+    tbl_outs = [
+        (
+            [
+                "-gen-python-op-bindings",
+                "-bind-dialect=affine",
+            ],
+            "mlir/dialects/_affine_ops_gen.py",
+        ),
+    ],
+    tblgen = "//mlir:mlir-tblgen",
+    td_file = "mlir/dialects/AffineOps.td",
+    deps = [
+        ":AffineOpsPyTdFiles",
+    ],
+)
+
+filegroup(
+    name = "AffineOpsPyFiles",
+    srcs = [
+        "mlir/dialects/_affine_ops_ext.py",
+        "mlir/dialects/affine.py",
+        ":AffineOpsPyGen",
+    ],
+)
+
+
 ##---------------------------------------------------------------------------##
 # Builtin dialect.
 ##---------------------------------------------------------------------------##



More information about the llvm-commits mailing list