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

Commit e1e997b

Browse files
committed
ci fixes
1 parent da244a0 commit e1e997b

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

.github/workflows/pull.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,16 +915,17 @@ jobs:
915915
continue-on-error: true
916916
run: |
917917
echo "Installing ExecuTorch"
918-
bash torchchat/utils/scripts/build_native.sh et
918+
bash torchchat/utils/scripts/install_et.sh
919919
- name: Install ExecuTorch python
920920
run: |
921921
echo "Install ExecuTorch python"
922+
export TORCHCHAT_ROOT=$PWD
922923
source "torchchat/utils/scripts/install_utils.sh"
923924
install_executorch_python_libs
924925
- name: Install runner
925926
run: |
926927
echo "Installing runner"
927-
bash torchchat/utils/scripts/build_native.sh et skip_et_install
928+
bash torchchat/utils/scripts/build_native.sh et
928929
- name: Run inference
929930
run: |
930931
python torchchat.py download stories15M
@@ -1077,11 +1078,11 @@ jobs:
10771078
continue-on-error: true
10781079
run: |
10791080
echo "Installing ExecuTorch"
1080-
bash torchchat/utils/scripts/build_native.sh et link_torchao
1081+
bash torchchat/utils/scripts/install_et.sh
10811082
- name: Install runner
10821083
run: |
10831084
echo "Installing runner"
1084-
bash torchchat/utils/scripts/build_native.sh et skip_et_install link_torchao
1085+
bash torchchat/utils/scripts/build_native.sh et link_torchao
10851086
- name: Install runner AOTI
10861087
id: install-runner-aoti
10871088
run: |

runner/build_android.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ install_executorch_python_libs $ENABLE_ET_PYBIND
4141
export CMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake
4242
export ANDROID_ABI=arm64-v8a
4343
export ANDROID_PLATFORM=android-23
44-
install_executorch
44+
install_executorch_cpp_libs
4545
build_runner_et

torchchat/utils/scripts/build_native.sh

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ if [ $# -eq 0 ]; then
2727
fi
2828

2929
LINK_TORCHAO=OFF
30-
SKIP_ET_INSTALL=OFF
3130
while (( "$#" )); do
3231
case "$1" in
3332
-h|--help)
@@ -49,11 +48,6 @@ while (( "$#" )); do
4948
LINK_TORCHAO=ON
5049
shift
5150
;;
52-
skip_et_install)
53-
echo "Skipping ET install..."
54-
SKIP_ET_INSTALL=ON
55-
shift
56-
;;
5751
*)
5852
echo "Invalid option: $1"
5953
show_help
@@ -73,18 +67,23 @@ pushd ${TORCHCHAT_ROOT}
7367
git submodule update --init
7468
git submodule sync
7569
if [[ "$TARGET" == "et" ]]; then
76-
find_cmake_prefix_path
77-
if [[ "$SKIP_ET_INSTALL" == "OFF" ]]; then
78-
install_pip_dependencies
79-
clone_executorch
80-
install_executorch_libs false
81-
fi
70+
if [ ! -d "${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install" ]; then
71+
echo "Directory ${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install does not exist."
72+
echo "Make sure you run install_executorch_libs"
73+
exit 1
74+
fi
8275

83-
if [[ "$LINK_TORCHAO" == "ON" ]]; then
84-
EXECUTORCH_INCLUDE_DIRS="${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/include;${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/src"
85-
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"
86-
install_torchao_custom_executorch_ops
76+
if [[ "$LINK_TORCHAO" == "ON" ]]; then
77+
if [ ! -d "${TORCHCHAT_ROOT}/torchao-build" ]; then
78+
echo "Directory ${TORCHCHAT_ROOT}/torchao-build does not exist."
79+
echo "Make sure you run clone_torchao"
80+
exit 1
8781
fi
82+
find_cmake_prefix_path
83+
EXECUTORCH_INCLUDE_DIRS="${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/include;${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/src"
84+
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"
85+
install_torchao_custom_executorch_ops
86+
fi
8887
fi
8988
popd
9089

torchchat/utils/scripts/install_utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ COMMON_CMAKE_ARGS="\
107107
-DEXECUTORCH_BUILD_XNNPACK=ON \
108108
-DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON"
109109

110-
install_executorch() {
110+
install_executorch_cpp_libs() {
111111
# AOT lib has to be build for model export
112112
# So by default it is built, and you can explicitly opt-out
113113
EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT_VAR=OFF
@@ -156,7 +156,7 @@ install_executorch() {
156156
}
157157

158158
install_executorch_libs() {
159-
install_executorch
159+
install_executorch_cpp_libs
160160
install_executorch_python_libs $1
161161
}
162162

0 commit comments

Comments
 (0)