Skip to content

Commit e7a1dc2

Browse files
efferifickErick Ochoa
andauthored
[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 <[email protected]>
1 parent ec1922b commit e7a1dc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/cmake/modules/MLIRDetectPythonEnv.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ macro(mlir_configure_python_dev_packages)
1919
set(_python_development_component Development.Module)
2020

2121
find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION}
22-
COMPONENTS Interpreter ${_python_development_component} NumPy REQUIRED)
22+
COMPONENTS Interpreter ${_python_development_component} REQUIRED)
2323
unset(_python_development_component)
2424
message(STATUS "Found python include dirs: ${Python3_INCLUDE_DIRS}")
2525
message(STATUS "Found python libraries: ${Python3_LIBRARIES}")

0 commit comments

Comments
 (0)