[Mlir-commits] [mlir] [CMake] Remove requirement of NumPy header files (PR #108465)
Erick Ochoa
llvmlistbot at llvm.org
Thu Sep 12 15:35:31 PDT 2024
https://github.com/efferifick created https://github.com/llvm/llvm-project/pull/108465
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.
>From 4a7ea2337ef50cffba4ed5771542e9882623adbb Mon Sep 17 00:00:00 2001
From: Erick Ochoa <erick at ceci-nest-pas.me>
Date: Thu, 12 Sep 2024 18:32:45 -0400
Subject: [PATCH] Remove requirement of NumPy header files
---
mlir/cmake/modules/MLIRDetectPythonEnv.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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}")
More information about the Mlir-commits
mailing list