- Links against libMLIR.so if the project is built for DYLIBs.
- Puts things in the right place in build and install time python/ trees so that RPaths line up.
- Adds install actions to install both the extension and sources.
- Copies py source files to the build directory to match (consistent layout between build/install time and one place to point a PYTHONPATH for tests and interactive use).
- Finally, "import mlir" from an installed LLVM just works.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Just a drive-by nit.
Please defer to others that have been tracking this work more closely for more substantial review.
edit: you seem to have caught the nit.
LGTM, I use the following commands in the build directory:
cmake --build . --target check-mlir cmake --build . --target install
I have a question that if I only want to install MLIRBindingsPythonExtension and MLIRBindingsPythonSources (without installing llvm, llvm-c, mlir, mlir-c, etc.), what should I do?
This should work:
cmake --build . --target install-MLIRBindingsPythonSources install-MLIRBindingsPythonExtension
Also, for interactive use, you don't need to install. Just build those two targets and set your PYTHONPATH to the python dir in your build directory.
This should work:
cmake --build . --target install-MLIRBindingsPythonSources install-MLIRBindingsPythonExtension
It works. Thanks!
mlir/lib/Bindings/Python/CMakeLists.txt | ||
---|---|---|
15 | Did you mean ${PY_SRC_FILE} (singular) here? |
mlir/test/lit.cfg.py | ||
---|---|---|
102–108 | I don't think this should get littered in the llvm install. There should be a separate mlir-npcomp_obj_root, I think. |
Did you mean ${PY_SRC_FILE} (singular) here?