Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 14365c4

Browse files
committed
up
1 parent 9eed5d1 commit 14365c4

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.github/workflows/pull.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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: |

runner/aoti.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ENDIF()
1515

1616
find_package(CUDA)
1717

18-
find_package(Torch 2.4.0)
18+
find_package(Torch REQUIRED)
1919
if(Torch_FOUND)
2020
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g ${TORCH_CXX_FLAGS} -fpermissive")
2121

torchchat/utils/scripts/build_native.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ while (( "$#" )); do
5757
done
5858

5959
source "$(dirname "${BASH_SOURCE[0]}")/install_utils.sh"
60+
find_cmake_prefix_path
6061

6162
if [ -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
@@ -94,9 +93,9 @@ popd
9493

9594
# CMake commands
9695
if [[ "$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
9897
else
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
10099
fi
101100
cmake --build ./cmake-out --target "${TARGET}"_run
102101

torchchat/utils/scripts/install_utils.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ clone_torchao() {
186186
install_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

0 commit comments

Comments
 (0)