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

Commit 54cc7c9

Browse files
Improve Quantization Setup Prompts and Doc
1 parent 0299a37 commit 54cc7c9

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

docs/quantization.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ From the torchchat root directory, run
149149
bash torchchat/utils/scripts/build_torchao_ops.sh
150150
```
151151

152+
Note that before running it, you must first clone torchao with `bash torchchat/utils/scripts/clone_torchao.sh` if you have not done so already.
152153
This should take about 10 seconds to complete.
153154

154155
When building the AOTI and C++ runners, you must pass the flag link_torchao_ops when running the scripts the build the runners.
@@ -161,7 +162,7 @@ bash torchchat/utils/scripts/build_native.sh aoti link_torchao_ops
161162
bash torchchat/utils/scripts/build_native.sh et link_torchao_ops
162163
```
163164

164-
Note before running `bash torchchat/utils/scripts/build_native.sh et link_torchao_ops`, you must first install executorch with `bash torchchat/utils/scripts/install_et.sh` if you have not done so already.
165+
Note that before running `bash torchchat/utils/scripts/build_native.sh et link_torchao_ops`, you must first install executorch with `bash torchchat/utils/scripts/install_et.sh` if you have not done so already.
165166

166167
### Examples
167168

@@ -218,6 +219,7 @@ From the torchchat root directory, run
218219
```
219220
bash torchchat/utils/scripts/build_torchao_ops.sh mps
220221
```
222+
Note that before running it, you must first clone torchao with `bash torchchat/utils/scripts/clone_torchao.sh` if you have not done so already.
221223

222224
### Examples
223225

torchchat/utils/scripts/build_native.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ git submodule sync
7070
if [[ "$TARGET" == "et" ]]; then
7171
if [ ! -d "${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install" ]; then
7272
echo "Directory ${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install does not exist."
73-
echo "Make sure you run install_executorch_libs"
73+
echo "Make sure you run bash torchchat/utils/scripts/install_et.sh"
7474
exit 1
7575
fi
7676

7777
if [[ "$LINK_TORCHAO_OPS" == "ON" ]]; then
7878
if [ ! -d "${TORCHCHAT_ROOT}/torchao-build" ]; then
7979
echo "Directory ${TORCHCHAT_ROOT}/torchao-build does not exist."
80-
echo "Make sure you run clone_torchao"
80+
echo "Make sure you run bash torchchat/utils/scripts/clone_torchao.sh"
8181
exit 1
8282
fi
8383

torchchat/utils/scripts/build_torchao_ops.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ if [[ "$device" != "cpu" && "$device" != "mps" ]]; then
1212
exit 1
1313
fi
1414

15+
if [ ! -d "${TORCHCHAT_ROOT}/torchao-build" ]; then
16+
echo "Directory ${TORCHCHAT_ROOT}/torchao-build does not exist."
17+
echo "Make sure you run bash torchchat/utils/scripts/clone_torchao.sh"
18+
exit 1
19+
fi
20+
1521
source "$(dirname "${BASH_SOURCE[0]}")/install_utils.sh"
1622

1723
pushd ${TORCHCHAT_ROOT}

0 commit comments

Comments
 (0)