Skip to content

Commit 0562edb

Browse files
committed
Update (base update)
[ghstack-poisoned]
2 parents 70f15c6 + 57078b4 commit 0562edb

96 files changed

Lines changed: 3269 additions & 611 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/scripts/test-rocm-aoti.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ export TORCHINDUCTOR_COMPILE_THREADS=1
2424

2525
read -r TORCH_VERSION TORCHAO_VERSION < <(
2626
python - <<'PY'
27-
from install_requirements import TORCHAO_NIGHTLY_VERSION
27+
from install_requirements import ROCM_TORCHAO_NIGHTLY_VERSION
2828
from torch_pin import TORCH_VERSION
2929
30-
print(TORCH_VERSION, TORCHAO_NIGHTLY_VERSION)
30+
print(TORCH_VERSION, ROCM_TORCHAO_NIGHTLY_VERSION)
3131
PY
3232
)
3333
# TorchAO ROCm wheels are not exposed by the per-version pip index.

‎.ci/scripts/test-rocm-voxtral.sh‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ export HF_TOKEN
3535

3636
read -r TORCH_VERSION TORCHAO_VERSION < <(
3737
python - <<'PY'
38-
from install_requirements import TORCHAO_NIGHTLY_VERSION
38+
from install_requirements import ROCM_TORCHAO_NIGHTLY_VERSION
3939
from torch_pin import TORCH_VERSION
4040
41-
print(TORCH_VERSION, TORCHAO_NIGHTLY_VERSION)
41+
print(TORCH_VERSION, ROCM_TORCHAO_NIGHTLY_VERSION)
4242
PY
4343
)
4444
# TorchAO ROCm wheels are not exposed by the per-version pip index.
@@ -48,7 +48,22 @@ python -m pip install "torch==${TORCH_VERSION}" \
4848
--index-url "${PYTORCH_ROCM_INDEX}"
4949
python -m pip install -r requirements-dev.txt \
5050
"${TORCHAO_WHEEL}"
51-
python -m pip install --editable . --no-build-isolation
51+
# ExecuTorch requires torchao>=TORCHAO_NIGHTLY_VERSION, which has no ROCm build, so
52+
# install its other dependencies separately to keep the ROCm TorchAO wheel in place.
53+
python -m pip install --editable . --no-build-isolation --no-deps
54+
python - <<'PY' >"${VOXTRAL_CI_TMPDIR}/executorch-deps.txt"
55+
from importlib.metadata import requires
56+
57+
from packaging.requirements import Requirement
58+
59+
for spec in requires("executorch") or []:
60+
req = Requirement(spec)
61+
if req.name == "torchao":
62+
continue
63+
if req.marker is None or req.marker.evaluate({"extra": ""}):
64+
print(spec)
65+
PY
66+
python -m pip install -r "${VOXTRAL_CI_TMPDIR}/executorch-deps.txt"
5267

5368
if ! command -v conda >/dev/null; then
5469
echo "The ROCm CI image must provide conda for its runtime libraries"

‎.github/pytorch-probot.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ tracking_issue: 7679
33
ciflow_push_tags:
44
- ciflow/android
55
- ciflow/apple
6+
- ciflow/coreai
67
- ciflow/cuda
78
- ciflow/cuda-perf
89
- ciflow/docker

‎.github/workflows/android-release-artifacts.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ jobs:
162162
163163
if [[ "$FLAVOR" == "qnn" || "$FLAVOR" == "all" ]]; then
164164
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
165-
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
165+
# build_android_library.sh builds the QNN runtime included in the AAR;
166+
# the host-only PyQnnManagerAdaptor is not part of this artifact.
166167
export EXECUTORCH_BUILD_QNN=ON
167168
source backends/qualcomm/scripts/qnn_config.sh
168169
export QNN_SDK_ROOT="/tmp/qnn/${QNN_VERSION}"

‎.github/workflows/coreai.yml‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Core AI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/*
8+
tags:
9+
- ciflow/coreai/*
10+
pull_request:
11+
paths:
12+
- .github/workflows/coreai.yml
13+
- backends/apple/coreai/**
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
18+
cancel-in-progress: true
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
run-decision:
25+
name: CI run decision
26+
uses: ./.github/workflows/_ci-run-decision.yml
27+
28+
test-coreai:
29+
needs: run-decision
30+
if: |
31+
github.event_name == 'pull_request' ||
32+
needs.run-decision.outputs.is-full-run == 'true'
33+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
34+
with:
35+
default-packages: ""
36+
job-name: test-coreai
37+
# GitHub-hosted macOS 27 with Xcode 27 (public preview).
38+
runner: xcode-27
39+
# coreai-opt supports Python < 3.14.
40+
python-version: "3.12"
41+
submodules: recursive
42+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
43+
timeout: 90
44+
script: |
45+
set -eux
46+
47+
echo "::group::Toolchain"
48+
sw_vers
49+
xcodebuild -version
50+
xcrun --show-sdk-version
51+
echo "::endgroup::"
52+
53+
echo "::group::Install the Metal Toolchain"
54+
# coreai-build ships in the Metal Toolchain; without it the AOT compile
55+
# tests skip.
56+
xcodebuild -downloadComponent MetalToolchain
57+
xcrun --find coreai-build
58+
echo "::endgroup::"
59+
60+
echo "::group::Install ExecuTorch and Core AI requirements"
61+
${CONDA_RUN} python install_executorch.py --editable > /dev/null
62+
${CONDA_RUN} pip install -r backends/apple/coreai/requirements.txt
63+
${CONDA_RUN} pip list
64+
echo "::endgroup::"
65+
66+
echo "::group::Run Core AI export tests"
67+
${CONDA_RUN} python -m pytest backends/apple/coreai
68+
echo "::endgroup::"

‎.github/workflows/pull.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,24 @@ jobs:
871871
872872
.ci/scripts/setup-arm-baremetal-tools.sh --disable-ethos-u-deps
873873
874+
if [[ "${{ matrix.test_arm_backend }}" == "test_pytest_ops_no_target" ]]; then
875+
for backend in vgf u55 u85; do
876+
python backends/arm/scripts/docgen/generate_op_support.py \
877+
--backend "$backend" --check || exit 1
878+
879+
python backends/arm/scripts/docgen/generate_op_support.py \
880+
--backend "$backend" || exit 1
881+
done
882+
883+
git diff --exit-code -- \
884+
docs/source/backends/arm-vgf/VGF_op_support.md \
885+
docs/source/backends/arm-ethos-u/U55_op_support.md \
886+
docs/source/backends/arm-ethos-u/U85_op_support.md || {
887+
echo "::error::Operator support documentation is outdated. Regenerate it and commit the changes."
888+
exit 1
889+
}
890+
fi
891+
874892
ARM_TEST=${{ matrix.test_arm_backend }}
875893
876894
# Test test_arm_backend.sh with test
@@ -887,6 +905,7 @@ jobs:
887905
include:
888906
- test_arm_backend: test_pytest_ops_vkml
889907
- test_arm_backend: test_ootb_tests_vgf
908+
- test_arm_backend: test_runtime_vgf
890909
fail-fast: false
891910
with:
892911
runner: linux.2xlarge.memory

‎.github/workflows/trunk.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ jobs:
328328
- test_arm_backend: test_pytest_models_vkml
329329
- test_arm_backend: test_run_vkml
330330
- test_arm_backend: test_ootb_tests_vgf
331+
- test_arm_backend: test_runtime_vgf
331332
- test_arm_backend: test_smaller_stories_llama_vkml
332333
fail-fast: false
333334
with:

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ cmake-ios-out/
1818
cmake-out*
1919
cmake-out-android/
2020
backends/webgpu/third-party/
21+
backends/arm/test/models/neural_graphics_data/
2122
build-android/
2223
build-x86/
2324
build-direct/

‎backends/apple/__init__.py‎

Whitespace-only changes.

‎backends/apple/coreai/.llms/skills/code-writing.md‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,15 @@ Legitimate non-prose dashes are fine: CLI flags (`--platform`,
3333

3434
## Running the tests
3535

36-
Run the whole backend suite (both `test/` and `passes/test/`) with the helper
37-
script, from inside the Core AI conda env:
36+
Run the whole backend suite (both `test/` and `passes/test/`) from the
37+
repository root, in an env with ExecuTorch installed in editable mode and
38+
`backends/apple/coreai/requirements.txt` installed:
3839

3940
```bash
40-
conda run -n coreai backends/apple/coreai/run_all_tests.sh
41+
python -m pytest backends/apple/coreai
4142
```
4243

43-
Extra args are forwarded to `unittest`, e.g. `... run_all_tests.sh -v` or
44-
`... run_all_tests.sh -k sidecar`.
45-
46-
**Use this script (unittest), not `pytest` directly.** pytest's default
47-
discovery puts `backends/apple/` on `sys.path`, so `import coreai` resolves to
48-
this backend directory and shadows the real Apple `coreai` SDK (`coreai_torch`
49-
then fails importing `coreai.authoring`). unittest imports via the full
50-
`executorch.backends.apple.coreai.*` path and avoids the shadowing.
44+
Standard pytest options apply, e.g. `-v` or `-k sidecar`.
5145

5246
The real-toolchain AOT test (`CoreAIAOTCompileTest`) is gated on
5347
`xcrun coreai-build`; it runs on macOS with the Metal Toolchain and skips

0 commit comments

Comments
 (0)