Skip to content

Commit 3396be7

Browse files
Merge branch 'main' into validate_manifest
2 parents baa9e65 + ec31735 commit 3396be7

365 files changed

Lines changed: 13247 additions & 4179 deletions

File tree

Some content is hidden

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

.ci/docker/common/install_linter.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,3 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1313
# NB: Install all linter dependencies, the caching of lintrunner init could be
1414
# done after Executorch becomes public
1515
pip_install -r requirements-lintrunner.txt
16-
17-
# Install google-java-format
18-
curl -L --retry 3 --retry-all-errors https://github.com/google/google-java-format/releases/download/v1.23.0/google-java-format_linux-x86-64 > /opt/google-java-format
19-
chmod +x /opt/google-java-format

.ci/scripts/unittest-macos-cmake.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,19 @@ set -eux
1212
export TORCHINDUCTOR_CACHE_DIR="$(mktemp -d "${RUNNER_TEMP:-/tmp}/torchinductor_cache_XXXXXX")"
1313
trap 'rm -rf "${TORCHINDUCTOR_CACHE_DIR}"' EXIT
1414

15-
# Run pytest with coverage
16-
${CONDA_RUN} pytest -n auto --cov=./ --cov-report=xml
15+
# TODO(SS-JIA): AOTI tests hang on macOS CI runners — the thread blocks in
16+
# native C/C++ code (dlopen / inductor compilation) so faulthandler cannot
17+
# even produce a traceback. Diagnosis ongoing in #19886.
18+
AOTI_SKIPS=(
19+
--ignore=examples/models/llama3_2_vision/preprocess/test_preprocess.py
20+
--ignore=examples/models/llama3_2_vision/vision_encoder/test/test_vision_encoder.py
21+
--ignore=examples/models/llama3_2_vision/text_decoder/test/test_text_decoder.py
22+
--deselect=extension/llm/modules/test/test_position_embeddings.py::TilePositionalEmbeddingTest::test_tile_positional_embedding_aoti
23+
--deselect=extension/llm/modules/test/test_position_embeddings.py::TiledTokenPositionalEmbeddingTest::test_tiled_token_positional_embedding_aoti
24+
--deselect=extension/llm/modules/test/test_attention.py::AttentionTest::test_attention_aoti
25+
)
26+
27+
${CONDA_RUN} pytest -n auto --cov=./ --cov-report=xml "${AOTI_SKIPS[@]}"
1728
# Run gtest
1829
LLVM_PROFDATA="xcrun llvm-profdata" LLVM_COV="xcrun llvm-cov" \
1930
${CONDA_RUN} test/run_oss_cpp_tests.sh

.github/scripts/propose_ghstack_orig_pr.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,9 @@ def extract_stack_from_body(pr_body: str) -> List[int]:
5252
"""
5353

5454
prs = []
55-
ghstack_begin = (
56-
"Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):"
57-
)
5855
ghstack_begin_seen = False
5956
for line in pr_body.splitlines():
60-
if ghstack_begin in line:
57+
if line.startswith("Stack from [ghstack]"):
6158
ghstack_begin_seen = True
6259
if not ghstack_begin_seen:
6360
continue

.github/workflows/_unittest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
python-version: '3.11'
5050
submodules: 'recursive'
5151
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
52+
timeout: 120
5253
script: |
5354
set -eux
5455
# This is needed to get the prebuilt PyTorch wheel from S3

.github/workflows/lint.yml

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -125,49 +125,3 @@ jobs:
125125
uses: ./.github/workflows/_link_check.yml
126126
with:
127127
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
128-
129-
android-java-format:
130-
runs-on: ubuntu-latest
131-
permissions:
132-
contents: read
133-
steps:
134-
- uses: actions/checkout@v4
135-
with:
136-
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
137-
138-
- uses: actions/setup-java@v4
139-
with:
140-
distribution: 'temurin'
141-
java-version: '17'
142-
143-
- name: Check Java formatting
144-
run: |
145-
GOOGLE_JAVA_FORMAT_VERSION="1.24.0"
146-
curl -sSfL "https://github.com/google/google-java-format/releases/download/v${GOOGLE_JAVA_FORMAT_VERSION}/google-java-format-${GOOGLE_JAVA_FORMAT_VERSION}-all-deps.jar" \
147-
-o /tmp/google-java-format.jar
148-
149-
FILES_NEEDS_FORMAT=$(find extension/android/executorch_android/src/main/java/org/pytorch/executorch \
150-
extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm \
151-
extension/android/executorch_android/src/main/java/org/pytorch/executorch/annotations \
152-
extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch \
153-
extension/benchmark/android/benchmark/app/src/main/java/org/pytorch/minibench \
154-
extension/benchmark/android/benchmark/app/src/androidTest/java/org/pytorch/minibench \
155-
-type f -name "*.java" 2>/dev/null | \
156-
xargs -r java -jar /tmp/google-java-format.jar -n)
157-
158-
if [ -n "$FILES_NEEDS_FORMAT" ]; then
159-
echo "Warning: The following files need formatting:"
160-
echo "$FILES_NEEDS_FORMAT"
161-
echo ""
162-
echo "Please use google-java-format from https://github.com/google/google-java-format/releases/"
163-
echo ""
164-
echo "To fix, run one of these commands:"
165-
echo " # Using xargs (recommended):"
166-
echo " find <paths> -type f -name '*.java' | xargs google-java-format -i"
167-
echo ""
168-
echo " # Or format specific files:"
169-
echo "$FILES_NEEDS_FORMAT" | while IFS= read -r file; do
170-
echo " google-java-format -i \"$file\""
171-
done
172-
exit 1
173-
fi

.github/workflows/mlx.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
4848
${CONDA_RUN} pip list
4949
50+
echo "::group::Install Python test requirements"
51+
${CONDA_RUN} pip install gguf
52+
echo "::endgroup::"
53+
5054
echo "::group::Build test runners"
5155
${CONDA_RUN} cmake --build cmake-out --target op_test_runner multi_thread_test_runner -j$(( $(sysctl -n hw.ncpu) - 1 ))
5256
echo "::endgroup::"
@@ -76,6 +80,18 @@ jobs:
7680
${CONDA_RUN} python -m executorch.backends.mlx.model_ops.test_gated_delta_rule run -v
7781
echo "::endgroup::"
7882
83+
echo "::group::Run tq_norm op tests"
84+
${CONDA_RUN} python -m executorch.backends.mlx.model_ops.test_tq_norm run -v
85+
echo "::endgroup::"
86+
87+
echo "::group::Run tq4_compress op tests"
88+
${CONDA_RUN} python -m executorch.backends.mlx.model_ops.test_tq4_compress run -v
89+
echo "::endgroup::"
90+
91+
echo "::group::Run tq_dequant op tests"
92+
${CONDA_RUN} python -m executorch.backends.mlx.model_ops.test_tq_dequant run -v
93+
echo "::endgroup::"
94+
7995
test-mlx-qwen35-moe:
8096
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
8197
with:

.github/workflows/riscv64.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,22 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
include:
32-
- { model: add, xnnpack: false, quantize: false }
33-
- { model: add, xnnpack: true, quantize: false }
34-
- { model: mv2, xnnpack: false, quantize: false }
35-
- { model: mv2, xnnpack: true, quantize: false }
36-
- { model: mv2, xnnpack: true, quantize: true }
37-
- { model: mobilebert, xnnpack: false, quantize: false }
38-
- { model: mobilebert, xnnpack: true, quantize: false }
39-
- { model: mobilebert, xnnpack: true, quantize: true }
40-
- { model: llama2, xnnpack: false, quantize: false }
41-
- { model: llama2, xnnpack: true, quantize: false }
42-
- { model: llama2, xnnpack: true, quantize: true }
43-
- { model: resnet18, xnnpack: false, quantize: false }
44-
- { model: resnet18, xnnpack: true, quantize: false }
45-
- { model: resnet18, xnnpack: true, quantize: true }
31+
model:
32+
- add
33+
- mv2
34+
- mobilebert
35+
- llama2
36+
- resnet18
37+
- yolo26
38+
xnnpack: [true, false]
39+
quantize: [true, false]
40+
exclude:
41+
# We only enable quantization with XNNPACK
42+
- xnnpack: false
43+
quantize: true
44+
# We don't test quantization for Yolo26
45+
- model: yolo26
46+
quantize: true
4647
permissions:
4748
id-token: write
4849
contents: read

.github/workflows/trunk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ jobs:
278278
matrix:
279279
include:
280280
- test_arm_backend: test_pytest_ops_vkml
281+
- test_arm_backend: test_pytest_models_vkml
281282
- test_arm_backend: test_ootb_tests_vgf
282283
fail-fast: false
283284
with:

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "backends/arm/third-party/ethos-u-core-driver"]
2-
path = backends/arm/third-party/ethos-u-core-driver
3-
url = https://git.gitlab.arm.com/artificial-intelligence/ethos-u/ethos-u-core-driver.git
41
[submodule "backends/vulkan/third-party/Vulkan-Headers"]
52
path = backends/vulkan/third-party/Vulkan-Headers
63
url = https://github.com/KhronosGroup/Vulkan-Headers

.lintrunner.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ include_patterns = [
112112
'backends/arm/**/*.cpp',
113113
'backends/arm/**/*.h',
114114
'backends/arm/**/*.hpp',
115+
'backends/cortex_m/**/*.cpp',
116+
'backends/cortex_m/**/*.h',
115117
'examples/arm/**/*.cpp',
116118
'examples/arm/**/*.h',
117119
'examples/arm/**/*.hpp',

0 commit comments

Comments
 (0)