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

Commit 177b432

Browse files
committed
remove whole archive from custom_op
1 parent d92366f commit 177b432

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

install/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tiktoken
1212
# Miscellaneous
1313
snakeviz
1414
sentencepiece
15-
numpy<2.0
15+
numpy < 2.0
1616
gguf
1717
lm-eval==0.4.2
1818
blobfile

runner/et.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,20 @@ if(executorch_FOUND)
9595
XNNPACK
9696
pthreadpool
9797
cpuinfo
98+
custom_ops
9899
)
99100
target_link_options_shared_lib(optimized_native_cpu_ops_lib)
100101
target_link_options_shared_lib(quantized_ops_lib)
101102
target_link_options_shared_lib(xnnpack_backend)
103+
target_link_options_shared_lib(custom_ops)
104+
102105
# Not clear why linking executorch as whole-archive outside android/apple is leading
103106
# to double registration. Most likely because of linkage issues.
104107
# Will figure this out later. Until then use this.
105108
if(ANDROID OR APPLE)
106109
target_link_options_shared_lib(executorch)
107110
endif()
108111

109-
target_link_libraries(et_run PRIVATE
110-
"$<LINK_LIBRARY:WHOLE_ARCHIVE,${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/lib/libcustom_ops.a>")
111112
# This one is needed for cpuinfo where it uses android specific log lib
112113
if(ANDROID)
113114
target_link_libraries(et_run PRIVATE log)

torchchat/utils/scripts/install_et.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ENABLE_ET_PYBIND="${1:-true}"
1717

1818
pushd ${TORCHCHAT_ROOT}
1919
find_cmake_prefix_path
20-
install_pip_dependencies
2120
clone_executorch
2221
install_executorch_libs $ENABLE_ET_PYBIND
22+
install_executorch_python_libs $ENABLE_ET_PYBIND
2323
popd

torchchat/utils/scripts/install_utils.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ install_executorch_cpp_libs() {
148148
-DCMAKE_PREFIX_PATH=${MY_CMAKE_PREFIX_PATH} \
149149
-DEXECUTORCH_BUILD_KERNELS_CUSTOM_AOT=${EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT_VAR} \
150150
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=${EXECUTORCH_BUILD_KERNELS_CUSTOM_VAR} \
151-
-DEXECUTORCH_BUILD_XNNPACK=ON \
152151
${CROSS_COMPILE_ARGS} \
153152
-S . -B ${CMAKE_OUT_DIR} -G Ninja
154153
cmake --build ${CMAKE_OUT_DIR}
@@ -157,6 +156,8 @@ install_executorch_cpp_libs() {
157156
}
158157

159158
install_executorch_libs() {
159+
EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT_VAR=OFF
160+
EXECUTORCH_BUILD_KERNELS_CUSTOM_VAR=OFF
160161
install_executorch_cpp_libs
161162
install_executorch_python_libs $1
162163
}

0 commit comments

Comments
 (0)