[Mlir-commits] [mlir] [MLIR][Standalone] don't register everything (PR #157688)

Maksim Levental llvmlistbot at llvm.org
Tue Sep 9 08:21:27 PDT 2025


https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/157688

>From 0ab91593df8a9ca5df6ccd7b9e25c7f087603cdb Mon Sep 17 00:00:00 2001
From: Maksim Levental <maksim.levental at gmail.com>
Date: Tue, 9 Sep 2025 10:09:44 -0500
Subject: [PATCH 1/2] [MLIR][Standalone] don't register everything

We only need to register `builtin`.
---
 mlir/examples/standalone/python/CMakeLists.txt | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/mlir/examples/standalone/python/CMakeLists.txt b/mlir/examples/standalone/python/CMakeLists.txt
index cb10518e94e33..33e2640300043 100644
--- a/mlir/examples/standalone/python/CMakeLists.txt
+++ b/mlir/examples/standalone/python/CMakeLists.txt
@@ -54,9 +54,6 @@ add_mlir_python_common_capi_library(StandalonePythonCAPI
   RELATIVE_INSTALL_ROOT "../../../.."
   DECLARED_SOURCES
     StandalonePythonSources
-    # TODO: Remove this in favor of showing fine grained registration once
-    # available.
-    MLIRPythonExtension.RegisterEverything
     MLIRPythonSources.Core
     MLIRPythonSources.Dialects.builtin
 )
@@ -70,9 +67,6 @@ add_mlir_python_modules(StandalonePythonModules
   INSTALL_PREFIX "${MLIR_BINDINGS_PYTHON_INSTALL_PREFIX}"
   DECLARED_SOURCES
     StandalonePythonSources
-    # TODO: Remove this in favor of showing fine grained registration once
-    # available.
-    MLIRPythonExtension.RegisterEverything
     MLIRPythonSources.Core
     MLIRPythonSources.Dialects.builtin
   COMMON_CAPI_LINK_LIBS

>From ef55a39efe518b05b543cf905c576ef3eeb9e143 Mon Sep 17 00:00:00 2001
From: Maksim Levental <maksim.levental at gmail.com>
Date: Tue, 9 Sep 2025 08:21:19 -0700
Subject: [PATCH 2/2] Update CMakeLists.txt

---
 mlir/examples/standalone/python/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mlir/examples/standalone/python/CMakeLists.txt b/mlir/examples/standalone/python/CMakeLists.txt
index 33e2640300043..2c6a2ffde10b7 100644
--- a/mlir/examples/standalone/python/CMakeLists.txt
+++ b/mlir/examples/standalone/python/CMakeLists.txt
@@ -28,6 +28,7 @@ declare_mlir_python_extension(StandalonePythonSources.Pybind11Extension
     StandaloneExtensionPybind11.cpp
   EMBED_CAPI_LINK_LIBS
     StandaloneCAPI
+    MLIRCAPITransforms
   PYTHON_BINDINGS_LIBRARY pybind11
 )
 
@@ -38,6 +39,7 @@ declare_mlir_python_extension(StandalonePythonSources.NanobindExtension
     StandaloneExtensionNanobind.cpp
   EMBED_CAPI_LINK_LIBS
     StandaloneCAPI
+    MLIRCAPITransforms
   PYTHON_BINDINGS_LIBRARY nanobind
   GENERATE_TYPE_STUBS
 )



More information about the Mlir-commits mailing list