Bump llvm-project to 3d92722f74993969243d1400bc3257ca3d03902f. (#369)

* Picks up Python configure changes (was pinned to a bad intermediate commit).
* Uses the new mlir_configure_python_dev_packages() to ensure CMake python is found consistently.
* Fixes the JIT importer to build as a MODULE vs SHARED (needed for linking to Python as a module, per config changes).
* Adds some notes to the README to help folks build a smaller set focused just on this project.
pull/372/head
Stella Laurenzo 2021-10-21 21:09:00 -07:00 committed by GitHub
parent 22aeb967c5
commit fe69bb339c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 12 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
.env
*.code-workspace
.ipynb_checkpoints
*.venv/
/build/
__pycache__

View File

@ -113,15 +113,11 @@ include(AddMLIR)
################################################################################
# Setup python.
# TODO: Make one upstream macro to do this.
################################################################################
if(MLIR_ENABLE_BINDINGS_PYTHON)
include(MLIRDetectPythonEnv)
mlir_detect_pybind11_install()
find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION}
COMPONENTS Interpreter Development NumPy REQUIRED)
find_package(pybind11 2.6 CONFIG REQUIRED)
mlir_configure_python_dev_packages()
endif()
add_subdirectory(include)

View File

@ -70,7 +70,14 @@ cmake -GNinja -Bbuild \
# -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld"
# Use --ld-path= instead of -fuse-ld=lld for clang > 13
cmake --build build
# Build just torch-mlir (not all of LLVM)
cmake --build build --target tools/torch-mlir/all
# Run unit tests.
cmake --build build --target check-torch-mlir
# Build everything (including LLVM)
# cmake --build build
```
## Demos

@ -1 +1 @@
Subproject commit a54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa
Subproject commit 3d92722f74993969243d1400bc3257ca3d03902f

View File

@ -10,7 +10,7 @@ include_directories(BEFORE
)
link_directories("${TORCH_INSTALL_PREFIX}/lib")
add_library(TorchMLIRJITIRImporter SHARED
add_library(TorchMLIRJITIRImporter MODULE
class_annotator.cpp
get_registered_ops.cpp
function_importer.cpp