Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable LTC in out-of-tree build #1177

Merged
merged 1 commit into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Reenable LTC in out-of-tree build
  • Loading branch information
henrytwo committed Aug 8, 2022
commit e7126d68a4f8192abf5509fa696a7e7de83acb32
2 changes: 0 additions & 2 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ jobs:
externals/llvm-project/llvm
cmake --build llvm-build

# TODO: Reenable LTC once OOT build is successful (https://github.com/llvm/torch-mlir/issues/1154)
cmake -GNinja -Bbuild \
-DCMAKE_LINKER=lld \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
Expand All @@ -97,7 +96,6 @@ jobs:
-DMLIR_ENABLE_BINDINGS_PYTHON=OFF \
-DTORCH_MLIR_ENABLE_MHLO=ON \
-DTORCH_MLIR_USE_INSTALLED_PYTORCH=${{ matrix.torch-binary }} \
-DTORCH_MLIR_ENABLE_LTC=OFF \
-DPython3_EXECUTABLE=$(which python) \
.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ include_directories(BEFORE
)
link_directories("${TORCH_INSTALL_PREFIX}/lib")

# TODO: Currently, out-of-tree build fails when LIBRARY_TYPE is set to SHARED, so we have this toggle.
# See https://github.com/llvm/torch-mlir/issues/1154 for more details.
if(TORCH_MLIR_ENABLE_LTC)
set(LIBRARY_TYPE "SHARED")
else()
set(LIBRARY_TYPE "MODULE")
endif()

add_library(TorchMLIRJITIRImporter ${LIBRARY_TYPE}
add_library(TorchMLIRJITIRImporter SHARED
class_annotator.cpp
class_annotator_pybind.cpp
get_registered_ops.cpp
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ def run(self):
f"-DMLIR_ENABLE_BINDINGS_PYTHON=ON",
f"-DLLVM_ENABLE_PROJECTS=mlir",
f"-DTORCH_MLIR_ENABLE_MHLO=ON",
# TODO: Reenable LTC once JIT importer linkage issue is fixed (https://github.com/llvm/torch-mlir/issues/1154)
f"-DTORCH_MLIR_ENABLE_LTC=OFF",
f"-DLLVM_EXTERNAL_PROJECTS=torch-mlir;torch-mlir-dialects",
f"-DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR={src_dir}",
f"-DLLVM_EXTERNAL_TORCH_MLIR_DIALECTS_SOURCE_DIR={src_dir}/externals/llvm-external-projects/torch-mlir-dialects",
Expand Down