[llvm] [bazel][mlir][python] Port #155741: stub auto-generation (PR #157173)

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 5 13:52:46 PDT 2025


https://github.com/rupprecht created https://github.com/llvm/llvm-project/pull/157173

* Nanobind >= 2.9 is required now. Use 2.9.2
* Remove pyi filegroups that now refer to deleted files

>From 0d965143397583a06650230ee182ea088f78a5fd Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht at google.com>
Date: Fri, 5 Sep 2025 13:51:19 -0700
Subject: [PATCH] [bazel][mlir][python] Port #155741: stub auto-generation

---
 utils/bazel/WORKSPACE                         |  6 ++--
 .../mlir/python/BUILD.bazel                   | 36 -------------------
 2 files changed, 3 insertions(+), 39 deletions(-)

diff --git a/utils/bazel/WORKSPACE b/utils/bazel/WORKSPACE
index da69e1d7cf5a7..20c0fd1f4c985 100644
--- a/utils/bazel/WORKSPACE
+++ b/utils/bazel/WORKSPACE
@@ -186,9 +186,9 @@ maybe(
     http_archive,
     name = "nanobind",
     build_file = "@llvm-raw//utils/bazel/third_party_build:nanobind.BUILD",
-    sha256 = "bb35deaed7efac5029ed1e33880a415638352f757d49207a8e6013fefb6c49a7",
-    strip_prefix = "nanobind-2.4.0",
-    url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.4.0.tar.gz",
+    sha256 = "8ce3667dce3e64fc06bfb9b778b6f48731482362fb89a43da156632266cd5a90",
+    strip_prefix = "nanobind-2.9.2",
+    url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.9.2.tar.gz",
 )
 
 load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
diff --git a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
index d5385cd3a9650..8114e128d615c 100644
--- a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
@@ -32,13 +32,6 @@ filegroup(
     ],
 )
 
-filegroup(
-    name = "ExecutionEnginePyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlirExecutionEngine.pyi",
-    ],
-)
-
 filegroup(
     name = "IRPyFiles",
     srcs = [
@@ -53,14 +46,6 @@ filegroup(
     ]),
 )
 
-filegroup(
-    name = "IRPyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlir/__init__.pyi",
-        "mlir/_mlir_libs/_mlir/ir.pyi",
-    ],
-)
-
 filegroup(
     name = "MlirLibsPyFiles",
     srcs = [
@@ -75,13 +60,6 @@ filegroup(
     ],
 )
 
-filegroup(
-    name = "PassManagerPyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlir/passmanager.pyi",
-    ],
-)
-
 filegroup(
     name = "RewritePyFiles",
     srcs = [
@@ -659,13 +637,6 @@ gentbl_filegroup(
     ],
 )
 
-filegroup(
-    name = "PDLPyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlir/dialects/pdl.pyi",
-    ],
-)
-
 filegroup(
     name = "PDLPyFiles",
     srcs = [
@@ -756,13 +727,6 @@ filegroup(
 # Quant dialect.
 ##---------------------------------------------------------------------------##
 
-filegroup(
-    name = "QuantPyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlir/dialects/quant.pyi",
-    ],
-)
-
 filegroup(
     name = "QuantPyFiles",
     srcs = [



More information about the llvm-commits mailing list