Skip to content

Commit b9d9c8a

Browse files
committed
Update
[ghstack-poisoned]
2 parents 2f5d526 + 46d0580 commit b9d9c8a

File tree

68 files changed

+560
-822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+560
-822
lines changed

.buckconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@
3939

4040
[buck2]
4141
restarter=true
42+
43+
[oss]
44+
folly_cxx_tests = False

.ci/docker/common/install_java.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
set -ex
9+
10+
apt-get update
11+
12+
apt-get install -y --no-install-recommends openjdk-17-jdk

.ci/docker/ubuntu/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ ARG BUCK2_VERSION
3030
COPY ./common/install_buck.sh install_buck.sh
3131
RUN bash ./install_buck.sh && rm install_buck.sh
3232

33+
# Install java
34+
COPY ./common/install_java.sh install_java.sh
35+
RUN bash ./install_java.sh && rm install_java.sh
36+
3337
# Setup user
3438
COPY ./common/install_user.sh install_user.sh
3539
RUN bash ./install_user.sh && rm install_user.sh

.ci/scripts/build_llama_android.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ install_executorch_and_backend_lib() {
4242

4343
build_llama_runner() {
4444
echo "Building llama runner for Android..."
45+
pushd extension/llm/tokenizers
46+
echo "Updating tokenizers submodule"
47+
git submodule update --init
48+
popd
4549
ANDROID_ABI=arm64-v8a
4650
cmake -DBUCK2="${BUCK2}" \
4751
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK"/build/cmake/android.toolchain.cmake \

.ci/scripts/gather_test_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"dl3": "linux.4xlarge.memory",
3131
"emformer_join": "linux.4xlarge.memory",
3232
"emformer_predict": "linux.4xlarge.memory",
33+
"phi-4-mini": "linux.4xlarge.memory",
3334
}
3435
}
3536

.ci/scripts/test_ane_static_llama.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ fi
1717

1818
which "${PYTHON_EXECUTABLE}"
1919

20+
# Update tokenizers submodule
21+
pushd $EXECUTORCH_ROOT/extension/llm/tokenizers
22+
echo "Update tokenizers submodule"
23+
git submodule update --init
24+
popd
25+
2026
pushd $EXECUTORCH_ROOT/examples/apple/coreml/llama
2127

2228
# Download stories llama110m artifacts

.ci/scripts/test_llama.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ cmake_install_executorch_libraries() {
173173

174174
cmake_build_llama_runner() {
175175
echo "Building llama runner"
176+
pushd extension/llm/tokenizers
177+
echo "Updating tokenizers submodule"
178+
git submodule update --init
179+
popd
176180
dir="examples/models/llama"
177181
retry cmake \
178182
-DCMAKE_INSTALL_PREFIX=cmake-out \

.github/workflows/doc-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ jobs:
6868
make html
6969
cd ..
7070
71+
# Build javadoc:
72+
cd extension/android
73+
./gradlew javadoc
74+
cp -rf build/docs/javadoc "${RUNNER_DOCS_DIR}"
75+
cd ../..
76+
7177
# If it's main branch, add noindex tag to all .html files to exclude from Google Search indexing.
7278
echo "GitHub Ref: ${GITHUB_REF}"
7379
if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then
@@ -77,6 +83,7 @@ jobs:
7783
cp -rf docs/_build/html/* "${RUNNER_DOCS_DIR}"
7884
7985
mv docs/_build/html "${RUNNER_ARTIFACT_DIR}"
86+
cp -rf "${RUNNER_DOCS_DIR}"/javadoc "${RUNNER_ARTIFACT_DIR}"/html
8087
8188
ls -R "${RUNNER_ARTIFACT_DIR}"/*/*.html
8289

.gitmodules

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,9 @@
2828
[submodule "backends/xnnpack/third-party/pthreadpool"]
2929
path = backends/xnnpack/third-party/pthreadpool
3030
url = https://github.com/Maratyszcza/pthreadpool.git
31-
[submodule "extension/llm/third-party/abseil-cpp"]
32-
path = extension/llm/third-party/abseil-cpp
33-
url = https://github.com/abseil/abseil-cpp.git
34-
[submodule "extension/llm/third-party/re2"]
35-
path = extension/llm/third-party/re2
36-
url = https://github.com/google/re2.git
37-
[submodule "extension/llm/third-party/sentencepiece"]
38-
path = extension/llm/third-party/sentencepiece
39-
url = https://github.com/google/sentencepiece.git
31+
[submodule "extension/llm/tokenizers"]
32+
path = extension/llm/tokenizers
33+
url = https://github.com/pytorch-labs/tokenizers.git
4034
[submodule "kernels/optimized/third-party/eigen"]
4135
path = kernels/optimized/third-party/eigen
4236
url = https://gitlab.com/libeigen/eigen.git

backends/apple/coreml/test/test_coreml_partitioner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def forward(self, q, k, v, mask):
117117
v = torch.randn(batch_size, n_heads, max_seq_length, embedding_dim)
118118
mask = torch.randn(seq_len, max_seq_length)
119119
example_inputs = (q, k, v, mask)
120-
ep = torch.export.export(model, example_inputs)
120+
ep = torch.export.export(model, example_inputs, strict=True)
121121
coreml_partitioner = CoreMLPartitioner()
122122

123123
# Using to_edge_transform_and_lower, we expect SDPA will be preserved and show up in delegated graph

0 commit comments

Comments
 (0)