This repository was archived by the owner on Sep 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -929,6 +929,7 @@ jobs:
929929 ./install/install_requirements.sh
930930
931931 # Install ET
932+ export TORCHCHAT_ROOT=$PWD
932933 source ./torchchat/utils/scripts/install_utils.sh
933934 install_executorch_python_libs
934935
Original file line number Diff line number Diff line change 6666pushd ${TORCHCHAT_ROOT}
6767git submodule update --init
6868git submodule sync
69+
70+ find_cmake_prefix_path
71+
6972if [[ " $TARGET " == " et" ]]; then
7073 if [ ! -d " ${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /install" ]; then
7174 echo " Directory ${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /install does not exist."
@@ -81,7 +84,6 @@ if [[ "$TARGET" == "et" ]]; then
8184 fi
8285
8386 source " $( dirname " ${BASH_SOURCE[0]} " ) /install_utils.sh"
84- find_cmake_prefix_path
8587 EXECUTORCH_INCLUDE_DIRS=" ${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /install/include;${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /src"
8688 EXECUTORCH_LIBRARIES=" ${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /install/lib/libexecutorch_no_prim_ops.a;${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /install/lib/libextension_threadpool.a;${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /install/lib/libcpuinfo.a;${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /install/lib/libpthreadpool.a"
8789 install_torchao_executorch_ops
9193
9294# CMake commands
9395if [[ " $TARGET " == " et" ]]; then
94- cmake -S . -B ./cmake-out -DCMAKE_PREFIX_PATH=` python3 -c ' import torch;print(torch.utils.cmake_prefix_path) ' ` -DLINK_TORCHAO_OPS=" ${LINK_TORCHAO_OPS} " -DET_USE_ADAPTIVE_THREADS=ON -DCMAKE_CXX_FLAGS=" -D_GLIBCXX_USE_CXX11_ABI=1" -G Ninja
96+ cmake -S . -B ./cmake-out -DCMAKE_PREFIX_PATH=" ${MY_CMAKE_PREFIX_PATH} " -DLINK_TORCHAO_OPS=" ${LINK_TORCHAO_OPS} " -DET_USE_ADAPTIVE_THREADS=ON -DCMAKE_CXX_FLAGS=" -D_GLIBCXX_USE_CXX11_ABI=1" -G Ninja
9597else
96- cmake -S . -B ./cmake-out -DCMAKE_PREFIX_PATH=` python3 -c ' import torch;print(torch.utils.cmake_prefix_path) ' ` -DLINK_TORCHAO_OPS=" ${LINK_TORCHAO_OPS} " -DCMAKE_CXX_FLAGS=" -D_GLIBCXX_USE_CXX11_ABI=0" -G Ninja
98+ cmake -S . -B ./cmake-out -DCMAKE_PREFIX_PATH=" ${MY_CMAKE_PREFIX_PATH} " -DLINK_TORCHAO_OPS=" ${LINK_TORCHAO_OPS} " -DCMAKE_CXX_FLAGS=" -D_GLIBCXX_USE_CXX11_ABI=0" -G Ninja
9799fi
98100cmake --build ./cmake-out --target " ${TARGET} " _run
99101
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ install_pip_dependencies() {
2323}
2424
2525function find_cmake_prefix_path() {
26- path=` python3 -c " from distutils.sysconfig import get_python_lib;print(get_python_lib())" `
26+ path=` python -c " from distutils.sysconfig import get_python_lib;print(get_python_lib())" `
2727 MY_CMAKE_PREFIX_PATH=$path
2828}
2929
You can’t perform that action at this time.
0 commit comments