Skip to content

Commit 4d49bf3

Browse files
committed
up
1 parent 14d471f commit 4d49bf3

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/trunk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ jobs:
387387
eval "$(conda shell.bash hook)"
388388
389389
# Install requirements
390-
${CONDA_RUN} USE_CPP=1 python install_executorch.py
390+
${CONDA_RUN} ET_BUILD_TORCHAO_KERNELS=1 python install_executorch.py
391391
${CONDA_RUN} sh examples/models/llama/install_requirements.sh
392392
393393
# Run test

examples/models/llama/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ Please refer to [this tutorial](https://pytorch.org/executorch/main/llm/llama-de
339339
340340
## Running with low-bit kernels
341341
342-
We now give instructions for quantizating and running your model with low-bit kernels. These are still experimental, and require you do development on an Arm-based Mac, and install executorch from source with the environment variable USE_CPP=1 defined:
342+
We now give instructions for quantizating and running your model with low-bit kernels. These are still experimental, and require you do development on an Arm-based Mac, and install executorch from source with the environment variable ET_BUILD_TORCHAO_KERNELS=1 defined:
343343
```
344-
USE_CPP=1 python install_executorch.py
344+
ET_BUILD_TORCHAO_KERNELS=1 python install_executorch.py
345345
```
346346
347347
Also note that low-bit quantization often requires QAT (quantization-aware training) to give good quality results.

install_requirements.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,13 @@ def install_requirements(use_pytorch_nightly):
118118
# Install packages directly from local copy instead of pypi.
119119
# This is usually not recommended.
120120
new_env = os.environ.copy()
121-
if "USE_CPP" not in new_env:
121+
if ("ET_BUILD_TORCHAO_KERNELS" not in new_env) or (
122+
new_env["ET_BUILD_TORCHAO_KERNELS"] == "0"
123+
):
122124
new_env["USE_CPP"] = "0"
125+
else:
126+
assert new_env["ET_BUILD_TORCHAO_KERNELS"] == "1"
127+
new_env["USE_CPP"] = "1"
123128
subprocess.run(
124129
[
125130
sys.executable,

0 commit comments

Comments
 (0)