Skip to content

Commit c8b91c7

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 98c80a0 + 738968a commit c8b91c7

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.ci/scripts/build_llama_android.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ set -exu
1010
# shellcheck source=/dev/null
1111
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1212

13+
if [[ -z "${PYTHON_EXECUTABLE:-}" ]]; then
14+
PYTHON_EXECUTABLE=python3
15+
fi
16+
which "${PYTHON_EXECUTABLE}"
17+
1318
install_executorch_and_backend_lib() {
1419
echo "Installing executorch and xnnpack backend"
1520
clean_executorch_install_folders

.ci/scripts/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ cmake_install_executorch_lib() {
136136
clean_executorch_install_folders
137137
retry cmake -DBUCK2="$BUCK" \
138138
-DCMAKE_INSTALL_PREFIX=cmake-out \
139-
-DCMAKE_PREFIX_PATH="$($PYTHON -c 'import torch as _; print(_.__path__[0])')" \
139+
-DCMAKE_PREFIX_PATH="$($PYTHON_EXECUTABLE -c 'import torch as _; print(_.__path__[0])')" \
140140
-DCMAKE_BUILD_TYPE=Release \
141141
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
142142
-Bcmake-out .

test/run_oss_cpp_tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ elif [[ $(uname) == "Linux" ]]; then
2222
export LLVM_COV="${LLVM_COV:-llvm-cov}"
2323
fi
2424

25+
if [[ -z "${PYTHON_EXECUTABLE:-}" ]]; then
26+
PYTHON_EXECUTABLE=python3
27+
fi
28+
which "${PYTHON_EXECUTABLE}"
29+
2530
build_executorch() {
2631
BUILD_VULKAN="OFF"
2732
if [ -x "$(command -v glslc)" ]; then

0 commit comments

Comments
 (0)