This repository was archived by the owner on Sep 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -1198,17 +1198,17 @@ jobs:
11981198 sysctl machdep.cpu.brand_string
11991199 sysctl machdep.cpu.core_count
12001200 fi
1201- - name : Install ET
1202- run : |
1203- echo "Installing ExecuTorch"
1204- export TORCHCHAT_ROOT=${PWD}
1205- bash torchchat/utils/scripts/install_et.sh
12061201 - name : Install torchchat
12071202 run : |
12081203 echo "Intalling pip3 packages"
12091204 ./install/install_requirements.sh
12101205 pip3 list
12111206 python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
1207+ - name : Install ET
1208+ run : |
1209+ echo "Installing ExecuTorch"
1210+ export TORCHCHAT_ROOT=${PWD}
1211+ bash torchchat/utils/scripts/install_et.sh
12121212 - name : Install torchao-ops
12131213 id : install-torchao-ops
12141214 run : |
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ ENDIF()
1515
1616find_package(CUDA)
1717
18- find_package(Torch 2.4.0 )
18+ find_package(Torch REQUIRED )
1919if(Torch_FOUND)
2020 set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -g ${TORCH_CXX_FLAGS} -fpermissive" )
2121
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ while (( "$#" )); do
5757done
5858
5959source " $( dirname " ${BASH_SOURCE[0]} " ) /install_utils.sh"
60+ find_cmake_prefix_path
6061
6162if [ -z " ${ET_BUILD_DIR} " ]; then
6263 ET_BUILD_DIR=" et-build"
@@ -80,8 +81,6 @@ if [[ "$TARGET" == "et" ]]; then
8081 exit 1
8182 fi
8283
83- source " $( dirname " ${BASH_SOURCE[0]} " ) /install_utils.sh"
84- find_cmake_prefix_path
8584 EXECUTORCH_INCLUDE_DIRS=" ${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /install/include;${TORCHCHAT_ROOT} /${ET_BUILD_DIR} /src"
8685 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"
8786 install_torchao_executorch_ops
9493
9594# CMake commands
9695if [[ " $TARGET " == " et" ]]; then
97- 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
9897else
99- 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=1" -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=1" -G Ninja
10099fi
101100cmake --build ./cmake-out --target " ${TARGET} " _run
102101
Original file line number Diff line number Diff line change @@ -186,6 +186,8 @@ clone_torchao() {
186186install_torchao_aten_ops () {
187187 local device=${1:- cpu}
188188
189+ USE_CPP=1 pip install " ${TORCHCHAT_ROOT} /torchao-build/src/ao"
190+
189191 if [[ " $device " == " cpu" ]]; then
190192 echo " Building torchao custom ops for ATen"
191193 pushd ${TORCHCHAT_ROOT} /torchao-build/src/ao/torchao/experimental
You can’t perform that action at this time.
0 commit comments