Skip to content

Commit 776fe33

Browse files
authored
Merge branch 'main' into arm_zephyr_sdk_version_bump_v0.17.3
2 parents 5d2e019 + bd92f1a commit 776fe33

File tree

129 files changed

+2853
-2433
lines changed

Some content is hidden

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

129 files changed

+2853
-2433
lines changed

.ci/scripts/setup-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set -exu
1111
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1212

1313
read -r BUILD_TOOL BUILD_MODE EDITABLE < <(parse_args "$@")
14+
echo "Build tool: $BUILD_TOOL, Mode: $BUILD_MODE"
1415

1516
# As Linux job is running inside a Docker container, all of its dependencies
1617
# have already been installed, so we use PyTorch build from source here instead

.ci/scripts/test_backend_linux.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env 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+
set -eux
8+
9+
SUITE=$1
10+
FLOW=$2
11+
ARTIFACT_DIR=$3
12+
13+
echo "Running backend test job for suite $SUITE, flow $FLOW."
14+
echo "Saving job artifacts to $ARTIFACT_DIR."
15+
16+
# The generic Linux job chooses to use base env, not the one setup by the image
17+
eval "$(conda shell.bash hook)"
18+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
19+
conda activate "${CONDA_ENV}"
20+
21+
# Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
22+
source .ci/scripts/setup-vulkan-linux-deps.sh
23+
24+
# CMake options to use, in addition to the defaults.
25+
EXTRA_BUILD_ARGS="-DEXECUTORCH_BUILD_VULKAN=ON"
26+
27+
# We need the runner to test the built library.
28+
PYTHON_EXECUTABLE=python CMAKE_ARGS="$EXTRA_BUILD_ARGS" .ci/scripts/setup-linux.sh --build-tool cmake --build-mode Release
29+
30+
python -m executorch.backends.test.suite.runner $SUITE --flow $FLOW --report "$ARTIFACT_DIR/test_results.csv"

.ci/scripts/test_backend_macos.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env 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+
set -eux
8+
9+
SUITE=$1
10+
FLOW=$2
11+
ARTIFACT_DIR=$3
12+
13+
echo "Running backend test job for suite $SUITE, flow $FLOW."
14+
echo "Saving job artifacts to $ARTIFACT_DIR."
15+
16+
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21
17+
18+
bash .ci/scripts/setup-conda.sh
19+
eval "$(conda shell.bash hook)"
20+
21+
PYTHON_EXECUTABLE=python
22+
${CONDA_RUN} --no-capture-output .ci/scripts/setup-macos.sh --build-tool cmake --build-mode Release
23+
24+
${CONDA_RUN} --no-capture-output python -m executorch.backends.test.suite.runner $SUITE --flow $FLOW --report "$ARTIFACT_DIR/test_results.csv"

.ci/scripts/test_huggingface_optimum_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def test_vit(model_id, model_dir, recipe, *, quantize=False, run_only=False):
369369
), # fails to lower for CoreML
370370
"smollm2-135m": ("HuggingFaceTB/SmolLM2-135M", test_text_generation),
371371
"smollm3-3b": ("HuggingFaceTB/SmolLM3-3B", test_text_generation),
372-
"olmo": ("allenai/OLMo-1B-hf", test_text_generation),
372+
"olmo-1b": ("allenai/OLMo-1B-hf", test_text_generation),
373373
}
374374

375375
_mask_fill_mapping = {

.ci/scripts/unittest-buck2.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ set -eux
1111
# TODO: can't query //kernels/prim_ops because of non-buckified stuff in OSS.
1212
buck2 query "//backends/apple/... + //backends/example/... + \
1313
//backends/mediatek/... + //backends/transforms/... + \
14-
//backends/xnnpack/... + //configurations/... + //kernels/aten/... + \
15-
//kernels/optimized/... + //kernels/portable/... + //kernels/quantized/... + \
16-
//kernels/test/... + //runtime/... + //schema/... + //test/... + //util/..."
14+
//backends/xnnpack/... + //configurations/... + //extension/flat_tensor: + \
15+
//kernels/aten/... + //kernels/optimized/... + //kernels/portable/... + \
16+
//kernels/quantized/... + //kernels/test/... + //runtime/... + //schema/... \
17+
+ //test/... + //util/..."
1718

1819
# TODO: optimized ops are unbuildable because they now use ATen; put
1920
# them back after we can use PyTorch in OSS buck.

.ci/scripts/utils.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ build_executorch_runner_cmake() {
131131
else
132132
CXXFLAGS=""
133133
fi
134-
# This command uses buck2 to gather source files and buck2 could crash flakily
135-
# on MacOS
136134
CXXFLAGS="$CXXFLAGS" retry cmake -DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}" -DCMAKE_BUILD_TYPE="${1:-Release}" ..
137135
popd || return
138136

.github/workflows/add-unanswered-to-project.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Add Open External Contributor PRs and Issues to PyTorch Org Project 136
22

33
on:
4-
# schedule:
5-
# - cron: '0 * * * *'
64
workflow_dispatch:
7-
5+
pull_request:
6+
paths:
7+
.github/workflows/add-unanswered-to-project.yml
88
jobs:
99
add_to_project:
1010
runs-on: ubuntu-latest

.github/workflows/nightly.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,52 @@ jobs:
3636
uses: ./.github/workflows/_link_check.yml
3737
with:
3838
ref: ${{ github.sha }}
39+
40+
backend-test-linux:
41+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
flow: [vulkan, xnnpack, xnnpack_static_int8_per_channel]
46+
suite: [models, operators]
47+
with:
48+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
49+
runner: linux.4xlarge.memory
50+
docker-image: ci-image:executorch-ubuntu-22.04-clang12
51+
submodules: recursive
52+
timeout: 120
53+
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
54+
script: |
55+
set -eux
56+
# Intentionally suppressing exit code for now.
57+
# TODO (gjcomer) Remove this when jobs are stable.
58+
EXIT_CODE=0
59+
.ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" || EXIT_CODE=$?
60+
echo "Test run complete with exit code $EXIT_CODE."
61+
62+
backend-test-macos:
63+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
64+
permissions:
65+
id-token: write
66+
contents: read
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
flow: [coreml, coreml_static_int8]
71+
suite: [models, operators]
72+
with:
73+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
74+
runner: macos-m1-stable
75+
python-version: 3.12
76+
submodules: recursive
77+
timeout: 120
78+
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
79+
script: |
80+
set -eux
81+
82+
# This is needed to get the prebuilt PyTorch wheel from S3
83+
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21
84+
85+
EXIT_CODE=0
86+
.ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" || EXIT_CODE=$?
87+
echo "Test run complete with exit code $EXIT_CODE."

.github/workflows/trunk.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
9999
# Run setup scripts for Arm FVP and Arm AOT Compilation
100100
cd $ZEPHYR_PROJ_ROOT/modules/lib/executorch
101-
install_executorch "--use-pt-pinned-commit"
101+
install_executorch
102102
.ci/scripts/setup-arm-baremetal-tools.sh --target-toolchain zephyr
103103
source examples/arm/ethos-u-scratch/setup_path.sh
104104
source $ZEPHYR_PROJ_ROOT/zephyr/zephyr-env.sh
@@ -836,14 +836,14 @@ jobs:
836836
strategy:
837837
matrix:
838838
config: [
839-
# XNNPack.
840-
llama3.2-1b|xnnpack|--quantize,
841-
qwen3-0.6b|xnnpack|--quantize,
842-
qwen3-1.7b|xnnpack|--quantize,
843-
gemma3-1b|xnnpack|--quantize,
844-
phi4-mini|xnnpack|--quantize,
845-
smollm2-135m|xnnpack|--quantize,
846-
smollm3-3b|xnnpack|--quantize,
839+
# # XNNPack. (Skipping for now due to intermittent segmentation faults, see https://github.com/huggingface/optimum-executorch/issues/122.)
840+
# llama3.2-1b|xnnpack|--quantize,
841+
# qwen3-0.6b|xnnpack|--quantize,
842+
# qwen3-1.7b|xnnpack|--quantize,
843+
# gemma3-1b|xnnpack|--quantize,
844+
# phi4-mini|xnnpack|--quantize,
845+
# smollm2-135m|xnnpack|--quantize,
846+
# smollm3-3b|xnnpack|--quantize,
847847
# CoreML.
848848
llama3.2-1b|coreml_fp32_gpu|--quantize,
849849
qwen3-0.6b|coreml_fp32_gpu|--quantize,

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dist/
2020
ethos-u-scratch/
2121
executorch.egg-info
2222
pip-out/
23+
build-profiling/
2324

2425
# Any exported models and profiling outputs
2526
*.bin
@@ -60,6 +61,7 @@ xcuserdata/
6061
/share/
6162
/version.py
6263
*.csv
64+
*_etdump
6365

6466
# Android
6567
*.aar

0 commit comments

Comments
 (0)