[Mlir-commits] [mlir] [mlir][python] factor out pure python core sources (PR #71592)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Nov 7 14:45:05 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Maksim Levental (makslevental)

<details>
<summary>Changes</summary>

I'd like to be able to install just the Python core sources (without building/including the pybind sources).

---
Full diff: https://github.com/llvm/llvm-project/pull/71592.diff


1 Files Affected:

- (modified) mlir/python/CMakeLists.txt (+4-2) 


``````````diff
diff --git a/mlir/python/CMakeLists.txt b/mlir/python/CMakeLists.txt
index 88e6e13602d291a..971ad2dd214a15f 100644
--- a/mlir/python/CMakeLists.txt
+++ b/mlir/python/CMakeLists.txt
@@ -7,14 +7,16 @@ include(AddMLIRPython)
 declare_mlir_python_sources(MLIRPythonSources)
 declare_mlir_python_sources(MLIRPythonSources.Dialects
   ADD_TO_PARENT MLIRPythonSources)
+declare_mlir_python_sources(MLIRPythonSources.Core
+  ADD_TO_PARENT MLIRPythonSources)
 
 ################################################################################
 # Pure python sources and generated code
 ################################################################################
 
-declare_mlir_python_sources(MLIRPythonSources.Core
+declare_mlir_python_sources(MLIRPythonSources.Core.Python
   ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
-  ADD_TO_PARENT MLIRPythonSources
+  ADD_TO_PARENT MLIRPythonSources.Core
   SOURCES
     _mlir_libs/__init__.py
     ir.py

``````````

</details>


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


More information about the Mlir-commits mailing list