From a1cd142340911de98bff7a9c70a1648d811bf246 Mon Sep 17 00:00:00 2001 From: Stella Laurenzo Date: Sat, 18 Nov 2023 19:12:14 -0800 Subject: [PATCH] Disable LTC for out-of-tree. --- .../python_deploy/build_linux_packages.sh | 16 +++++++++------- .../ltc/csrc/base_lazy_backend/CMakeLists.txt | 3 --- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/build_tools/python_deploy/build_linux_packages.sh b/build_tools/python_deploy/build_linux_packages.sh index 8b8c7b0eb..59dab5b6f 100755 --- a/build_tools/python_deploy/build_linux_packages.sh +++ b/build_tools/python_deploy/build_linux_packages.sh @@ -364,14 +364,16 @@ function setup_venv() { function build_out_of_tree() { local torch_from_bin="$1" local python_version="$2" - echo ":::: Build out-of-tree Torch from binary: $torch_from_bin with Python: $python_version" - local torch_version="$3" - local enable_ltc="ON" - if [[ "${torch_version}" == "stable" ]] - then - enable_ltc="OFF" - fi + echo ":::: Build out-of-tree Torch from binary: $torch_from_bin with Python: $python_version ($torch_version)" + + # Disabled due to link errors on undefined c10 and other core torch symbols. + enable_ltc="OFF" + # local enable_ltc="ON" + # if [[ "${torch_version}" == "stable" ]] + # then + # enable_ltc="OFF" + # fi if [ ! -d "/main_checkout/torch-mlir/llvm-build/lib/cmake/mlir/" ] then diff --git a/projects/ltc/csrc/base_lazy_backend/CMakeLists.txt b/projects/ltc/csrc/base_lazy_backend/CMakeLists.txt index d4845e28f..eee3044f0 100644 --- a/projects/ltc/csrc/base_lazy_backend/CMakeLists.txt +++ b/projects/ltc/csrc/base_lazy_backend/CMakeLists.txt @@ -71,9 +71,6 @@ target_link_libraries(torch_mlir_ltc_backend TorchMLIRAggregateCAPI TorchMLIRJITIRImporter ${TORCH_LIBRARIES} - # In some configurations, symbols are not found for inlines, so over-link. - torch_cpu - c10 ) message(STATUS "TORCH_CXXFLAGS=${TORCH_CXXFLAGS} -Wno-pedantic")