Skip to content

Commit 5d218ff

Browse files
committed
up
1 parent 4d49bf3 commit 5d218ff

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
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} ET_BUILD_TORCHAO_KERNELS=1 python install_executorch.py
390+
${CONDA_RUN} EXECUTORCH_BUILD_TORCHAO=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 ET_BUILD_TORCHAO_KERNELS=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 EXECUTORCH_BUILD_TORCHAO=1 defined:
343343
```
344-
ET_BUILD_TORCHAO_KERNELS=1 python install_executorch.py
344+
EXECUTORCH_BUILD_TORCHAO=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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,14 @@ 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 ("ET_BUILD_TORCHAO_KERNELS" not in new_env) or (
122-
new_env["ET_BUILD_TORCHAO_KERNELS"] == "0"
121+
if ("EXECUTORCH_BUILD_TORCHAO" not in new_env) or (
122+
new_env["EXECUTORCH_BUILD_TORCHAO"] == "0"
123123
):
124124
new_env["USE_CPP"] = "0"
125125
else:
126-
assert new_env["ET_BUILD_TORCHAO_KERNELS"] == "1"
126+
assert new_env["EXECUTORCH_BUILD_TORCHAO"] == "1"
127127
new_env["USE_CPP"] = "1"
128+
new_env["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5"
128129
subprocess.run(
129130
[
130131
sys.executable,

tools/cmake/preset/llm.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)
1717
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
1818
set_overridable_option(EXECUTORCH_BUILD_COREML ON)
1919
set_overridable_option(EXECUTORCH_BUILD_MPS ON)
20+
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
21+
set_overridable_option(EXECUTORCH_BUILD_TORCHAO ON)
22+
endif()
2023
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
2124
# Linux-specific code here
2225
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WIN32")

0 commit comments

Comments
 (0)