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

Commit 68b4631

Browse files
committed
init
1 parent 1b68263 commit 68b4631

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

runner/aoti.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ if(Torch_FOUND)
3030
endif()
3131

3232
if (LINK_TORCHAO_OPS)
33-
target_link_libraries(aoti_run "${TORCHCHAT_ROOT}/torchao-build/cmake-out/lib/liblinear_a8wxdq_ATEN${CMAKE_SHARED_LIBRARY_SUFFIX}")
33+
target_link_libraries(aoti_run "${TORCHCHAT_ROOT}/torchao-build/cmake-out/lib/libtorchao_ops_aten${CMAKE_SHARED_LIBRARY_SUFFIX}")
3434
endif()

runner/et.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,9 @@ if(executorch_FOUND)
117117
endif()
118118

119119
if(LINK_TORCHAO_OPS)
120-
target_link_libraries(et_run PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,${TORCHCHAT_ROOT}/torchao-build/cmake-out/lib/liblinear_a8wxdq_EXECUTORCH.a>")
120+
target_link_libraries(et_run PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,${TORCHCHAT_ROOT}/torchao-build/cmake-out/lib/libtorchao_ops_executorch.a>")
121121
target_link_libraries(et_run PRIVATE
122122
"${TORCHCHAT_ROOT}/torchao-build/cmake-out/lib/libtorchao_kernels_aarch64.a"
123-
"${TORCHCHAT_ROOT}/torchao-build/cmake-out/lib/libtorchao_ops_linear_EXECUTORCH.a"
124123
)
125124
endif()
126125

torchchat/utils/quantize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ def quantized_model(self) -> nn.Module:
891891
# Try loading custom op
892892
try:
893893
import glob
894-
libs = glob.glob(f"{torchao_build_path}/cmake-out/lib/liblinear_a8wxdq_ATEN.*")
894+
libs = glob.glob(f"{torchao_build_path}/cmake-out/lib/libtorchao_ops_aten.*")
895895
libs = list(filter(lambda l: (l.endswith("so") or l.endswith("dylib")), libs))
896896
torch.ops.load_library(libs[0])
897897
except Exception as e:

torchchat/utils/scripts/install_utils.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ clone_torchao() {
169169
pushd ${TORCHCHAT_ROOT}/torchao-build/src
170170
echo $pwd
171171

172-
git clone https://github.com/pytorch/ao.git
173-
cd ao
174-
git checkout $(cat ${TORCHCHAT_ROOT}/intstall/.pins/torchao-pin.txt)
172+
cp -R $HOME/fbsource/fbcode/pytorch/ao .
173+
# git clone https://github.com/pytorch/ao.git
174+
# cd ao
175+
# git checkout $(cat ${TORCHCHAT_ROOT}/intstall/.pins/torchao-pin.txt)
175176

176177
popd
177178
}
@@ -184,7 +185,7 @@ install_torchao_aten_ops() {
184185
cmake -DCMAKE_PREFIX_PATH=${MY_CMAKE_PREFIX_PATH} \
185186
-DCMAKE_INSTALL_PREFIX=${CMAKE_OUT_DIR} \
186187
-DCMAKE_BUILD_TYPE="Release" \
187-
-DTORCHAO_OP_TARGET="ATEN" \
188+
-DTORCHAO_OP_TARGET="aten" \
188189
-S . \
189190
-B ${CMAKE_OUT_DIR} -G Ninja
190191
cmake --build ${CMAKE_OUT_DIR} --target install --config Release
@@ -200,7 +201,7 @@ install_torchao_executorch_ops() {
200201
cmake -DCMAKE_PREFIX_PATH=${MY_CMAKE_PREFIX_PATH} \
201202
-DCMAKE_INSTALL_PREFIX=${CMAKE_OUT_DIR} \
202203
-DCMAKE_BUILD_TYPE="Release" \
203-
-DTORCHAO_OP_TARGET="EXECUTORCH" \
204+
-DTORCHAO_OP_TARGET="executorch" \
204205
-DEXECUTORCH_INCLUDE_DIRS="${EXECUTORCH_INCLUDE_DIRS}" \
205206
-DEXECUTORCH_LIBRARIES="${EXECUTORCH_LIBRARIES}" \
206207
-S . \

0 commit comments

Comments
 (0)