[Mlir-commits] [mlir] e7a1dc2 - [CMake] Remove requirement of NumPy header files (#108465)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Sep 12 18:16:32 PDT 2024


Author: Erick Ochoa
Date: 2024-09-12T21:16:27-04:00
New Revision: e7a1dc231ad2c8dcf034585472f311617e24006e

URL: https://github.com/llvm/llvm-project/commit/e7a1dc231ad2c8dcf034585472f311617e24006e
DIFF: https://github.com/llvm/llvm-project/commit/e7a1dc231ad2c8dcf034585472f311617e24006e.diff

LOG: [CMake] Remove requirement of NumPy header files (#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.

Co-authored-by: Erick Ochoa <erick at ceci-nest-pas.me>

Added: 
    

Modified: 
    mlir/cmake/modules/MLIRDetectPythonEnv.cmake

Removed: 
    


################################################################################
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