Skip to content

Commit 14d471f

Browse files
committed
disable torchao kernels by default
1 parent 503db13 commit 14d471f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
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} python install_executorch.py
390+
${CONDA_RUN} USE_CPP=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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,12 @@ 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. Also note that low-bit quantization often requires QAT (quantization-aware training) to give good quality results.
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:
343+
```
344+
USE_CPP=1 python install_executorch.py
345+
```
346+
347+
Also note that low-bit quantization often requires QAT (quantization-aware training) to give good quality results.
343348
344349
First export your model for lowbit quantization (step 2 above):
345350

install_requirements.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ 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-
new_env["USE_CPP"] = "1" # install torchao kernels
121+
if "USE_CPP" not in new_env:
122+
new_env["USE_CPP"] = "0"
122123
subprocess.run(
123124
[
124125
sys.executable,

0 commit comments

Comments
 (0)