[Mlir-commits] [mlir] [CMake] Remove requirement of NumPy header files (PR #108465)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Sep 12 15:36:24 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Erick Ochoa (efferifick)
<details>
<summary>Changes</summary>
NumPy header files were required for building MLIR, however the NumPy C-API is never used. In other words, NumPy is not a build time dependency. `numpy`, the python package, is required at runtime for the python bindings tests. In particular the file `mlir/python/mlir/runtime/np_to_memref.py` and all tests which may use it. This commit removes the build time dependency, but the runtime dependency remains through the `requirements.txt` file.
---
Full diff: https://github.com/llvm/llvm-project/pull/108465.diff
1 Files Affected:
- (modified) mlir/cmake/modules/MLIRDetectPythonEnv.cmake (+1-1)
``````````diff
diff --git a/mlir/cmake/modules/MLIRDetectPythonEnv.cmake b/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
index 0a486c1bbb5493..c07c55b1e17ad5 100644
--- a/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
+++ b/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
@@ -19,7 +19,7 @@ macro(mlir_configure_python_dev_packages)
set(_python_development_component Development.Module)
find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION}
- COMPONENTS Interpreter ${_python_development_component} NumPy REQUIRED)
+ COMPONENTS Interpreter ${_python_development_component} REQUIRED)
unset(_python_development_component)
message(STATUS "Found python include dirs: ${Python3_INCLUDE_DIRS}")
message(STATUS "Found python libraries: ${Python3_LIBRARIES}")
``````````
</details>
https://github.com/llvm/llvm-project/pull/108465
More information about the Mlir-commits
mailing list