Skip to content

Commit 0cb8eac

Browse files
author
Github Executorch
committed
Update on "Reuse GELU implementation from PyTorch core"
kernels/optimized doesn't need to support embedded systems, so it can just take a header-only dep on PyTorch. Note that, because we will pick up Sleef internally and ignore it externally thanks to ATen vec, this PR gets to enable optimized GELU in OSS. Testing: CI to make sure this doesn't break mobile build modes; happy to take advice on anything not currently covered that might break. Differential Revision: [D66335522](https://our.internmc.facebook.com/intern/diff/D66335522/) [ghstack-poisoned]
2 parents c4786f0 + 0676cb1 commit 0cb8eac

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/pull.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ jobs:
135135
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
136136
conda activate "${CONDA_ENV}"
137137
138+
source .ci/scripts/utils.sh
139+
install_executorch "use-pt-pinned-commit"
138140
BUILD_TOOL="cmake"
139141
PYTHON_EXECUTABLE=python \
140142
bash .ci/scripts/build_llama_android.sh "${BUILD_TOOL}"

.github/workflows/trunk.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ jobs:
379379
rm -rf cmake-out
380380
cmake \
381381
-DCMAKE_INSTALL_PREFIX=cmake-out \
382+
-DCMAKE_PREFIX_PATH="$(python -c 'import torch as _; print(_.__path__[0])')" \
382383
-DCMAKE_BUILD_TYPE=Release \
383384
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
384385
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
@@ -396,6 +397,7 @@ jobs:
396397
cmake \
397398
-DCMAKE_INSTALL_PREFIX=cmake-out \
398399
-DCMAKE_BUILD_TYPE=Release \
400+
-DCMAKE_PREFIX_PATH="$(python -c 'import torch as _; print(_.__path__[0])')" \
399401
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
400402
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
401403
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \

0 commit comments

Comments
 (0)