Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a83e7c4
Fix 2 broken tests caused by D105910457
metascroy May 22, 2026
ec76470
Cortex_M backend: Add more model tests (#19720)
AdrianLundell May 22, 2026
158c5d8
Convert Android LLM extension from Java to Kotlin (#19211)
kirklandsign May 23, 2026
6bda6c4
Globally serialize XNNPACK execution, add logging (#19742)
GregoryComer May 23, 2026
12f62f2
[ET Device Support] Module: allocate device memory for planned buffer…
Gasoonjia May 23, 2026
c27cc5d
[ET Device Support] CudaAllocator: device memory allocator for CUDA b…
Gasoonjia May 23, 2026
7d8063f
[ET Device Support] Define AOT device copy ops registry (#19748)
Gasoonjia May 23, 2026
d757776
Add extension_llm_runner to CMake deps (#19749)
kirklandsign May 23, 2026
b69cbcd
NXP backend: Enable Add Tensor with new Neutron flow (#19550)
roman-janik-nxp May 24, 2026
ba6074c
Back out "Globally serialize XNNPACK execution, add logging" (#19752)
julianchan-meta May 25, 2026
ee4c90a
Arm backend: Exclude build metadata from license checks
perheld May 25, 2026
b73df0b
NXP backend: Enable Sub Tensor with new Neutron flow (#19588)
roman-janik-nxp May 25, 2026
03e14ef
Arm backend: Add bf16 support for aten.index_select and aten.unfold_c…
vacu9708 May 25, 2026
b581615
Cortex-M backend: Add AoT scratch-buffer planning. (#19636)
Erik-Lundell May 26, 2026
5fc929f
Qualcomm AI Engine Direct - Refactor llama runner for dynamic IO dtyp…
chenweng-quic May 26, 2026
75fb249
add cuda allocator to cmake target (#19764) (#19764)
Gasoonjia May 26, 2026
c5e3e2b
Arm backend: Fix missing init in VGFSetup (#19765)
Erik-Lundell May 26, 2026
a89f1b4
Arm backend: Enable CPPCHECK for Cortex-M
perheld May 8, 2026
0bf018f
Add Yolo26 to matrix of tested models on RISC-V (#19741)
luhenry May 26, 2026
6128a45
Convert minibench Java files to Kotlin (#19760)
kirklandsign May 26, 2026
043c404
Cortex-M backend: enable Cortex-M0+ builds against Corstone-300 (#19731)
rascani May 26, 2026
fb3f6eb
Harden against concurrency violations (#19734) (#19734)
GregoryComer May 26, 2026
50ee05e
Convert Experimental, DType, MethodMetadata from Java to Kotlin
kirklandsign May 26, 2026
5d36c7c
NXP backend: Improve docs for NXP eIQ Neutron Kernel Selective Kernel…
roman-janik-nxp May 26, 2026
cedfd48
Arm backend: Validate TOSA resize parameters (#19757)
perheld May 26, 2026
29c3a23
Fix cortex_m test failures from D106339880
SS-JIA May 26, 2026
ae4fdb5
Set test seed per-test (#19744)
GregoryComer May 26, 2026
b4d62ed
Collapse Experimental.kt annotation onto a single line to satisfy linter
kirklandsign May 26, 2026
034b044
Handle out_dtype in ReplacePT2DequantWithCadenceDequantPass (#19743)
ethansfng May 27, 2026
79fe3a3
Add coreml_compute_plan.py: report which CoreML ops dispatch to ANE /…
john-rocky May 27, 2026
fb420f3
Fix bug with mixed weight cache + workspace sharing
GregoryComer May 27, 2026
77df9b7
New exported program pass manager and exported program passes (#16986)
DrJessop May 27, 2026
5d608cb
Add executorch-ubuntu-26.04-gcc15 docker image
luhenry May 23, 2026
6661a84
Add baremetal RISC-V smoke tests (rv32, rv64)
luhenry May 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .ci/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ case "${IMAGE_NAME}" in
OS_VERSION=24.04
GCC_VERSION=14
;;
executorch-ubuntu-26.04-gcc15)
LINTRUNNER=""
OS_VERSION=26.04
GCC_VERSION=15
;;
*)
echo "Invalid image name ${IMAGE_NAME}"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .ci/docker/common/install_docs_reqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ if [ -n "$BUILD_DOCS" ]; then
curl --retry 3 --retry-all-errors -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

curl --retry 3 --retry-all-errors -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
curl --retry 3 --retry-all-errors -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/yarn-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/yarn-archive-keyring.gpg] https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

apt-get update
apt-get install -y --no-install-recommends yarn
Expand Down
40 changes: 25 additions & 15 deletions .ci/scripts/test_riscv_qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,48 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# CI wrapper: install RISC-V cross-compile + qemu-user tooling, then run the
# RISC-V smoke test (export, cross-compile, qemu-user execution) via
# examples/riscv/run.sh. The bundled-IO comparison and Test_result: PASS
# check are done by run.sh.
# CI wrapper: install riscv32/64 cross-compile + qemu tooling, then drive
# examples/riscv/run.sh which does the export, cross-compile, qemu run, and
# bundled-IO PASS check.

set -eu

script_dir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
et_root_dir=$(realpath "${script_dir}/../..")

model="add"
xnnpack=false
backend="portable"
quantize=false
os="linux"
arch="rv64"
qemu_cpu_ext=""
verbose_xnnpack=false
debug_xnnpack=false

usage() {
cat <<EOF
Usage: $(basename "$0") [options]
Options:
--model=<NAME> Which model to export and run (default: add)
--xnnpack Enable the XNNPACK backend (AOT partitioner + runtime)
--quantize Produce an 8-bit quantized model
--verbose-xnnpack Build XNNPACK with XNN_LOG_LEVEL=4 to log microkernel dispatch
--debug-xnnpack Enable XNNPACK partitioner DEBUG logging and dump the lowered graph
-h, --help Show this help
--model=<NAME> Which model to export and run (default: ${model})
--quantize Produce an 8-bit quantized model
--backend=<NAME> AOT backend (portable|xnnpack) (default: ${backend})
--os=<NAME> Target OS (linux|baremetal) (default: ${os})
--arch=<NAME> Target arch (rv32|rv64) (default: ${arch})
--qemu-cpu-ext=<EXT> QEMU -cpu extensions (no rv32/rv64 prefix, default: none)
--verbose-xnnpack Build XNNPACK with XNN_LOG_LEVEL=4 to log microkernel dispatch
--debug-xnnpack Enable XNNPACK partitioner DEBUG logging and dump the lowered graph
-h, --help Show this help
EOF
}

for arg in "$@"; do
case $arg in
--model=*) model="${arg#*=}" ;;
--xnnpack) xnnpack=true ;;
--quantize) quantize=true ;;
--backend=*) backend="${arg#*=}" ;;
--os=*) os="${arg#*=}" ;;
--arch=*) arch="${arg#*=}" ;;
--qemu-cpu-ext=*) qemu_cpu_ext="${arg#*=}" ;;
--debug-xnnpack) debug_xnnpack=true ;;
--verbose-xnnpack) verbose_xnnpack=true ;;
-h|--help) usage; exit 0 ;;
Expand All @@ -46,8 +54,8 @@ for arg in "$@"; do
done

run_extra_args=()
if ${xnnpack}; then
run_extra_args+=(--xnnpack)
if [ -n "${qemu_cpu_ext}" ]; then
run_extra_args+=(--qemu-cpu-ext="${qemu_cpu_ext}")
fi
if ${quantize}; then
run_extra_args+=(--quantize)
Expand All @@ -60,4 +68,6 @@ if ${verbose_xnnpack}; then
fi

bash "${et_root_dir}/examples/riscv/setup.sh"
bash "${et_root_dir}/examples/riscv/run.sh" --model="${model}" "${run_extra_args[@]}"
bash "${et_root_dir}/examples/riscv/run.sh" \
--model="${model}" --backend="${backend}" --os="${os}" --arch="${arch}" \
"${run_extra_args[@]}"
53 changes: 32 additions & 21 deletions .github/workflows/_test_riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,44 @@ on:
type: number
default: 30
model:
description: 'Which model to run. Possible values are: add, mv2 (mobilenetv2)'
description: 'Which model to run (add, mv2, mobilebert, llama2, resnet18, yolo26)'
required: false
type: string
default: 'add'
xnnpack:
description: 'Whether to enable XNNPACK'
required: false
type: boolean
default: false
quantize:
description: 'Produce an 8-bit quantized model'
required: false
type: boolean
default: false
qemu-cpu:
description: 'Configuration(s) for the CPU to emulate with QEMU, expecting a JSON array'
required: true
backend:
description: 'AOT backend to lower to (portable|xnnpack)'
required: false
type: string
docker-image:
description: 'The docker image to use for this job'
default: 'portable'
os:
description: 'Target OS for the runner (linux|baremetal)'
required: false
type: string
default: 'linux'
arch:
description: 'Target architecture (rv32|rv64)'
required: false
type: string
default: 'rv64'
qemu-cpu-ext:
description: >-
JSON array of QEMU -cpu *extension* strings (no rv32/rv64 prefix).
The script splices each entry with `arch` to form the final -cpu
value. Use [""] for plain base-ISA runs.
required: true
type: string

jobs:
run:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
with:
runner: linux.2xlarge
docker-image: ci-image:executorch-ubuntu-24.04-gcc14
docker-image: ci-image:executorch-ubuntu-26.04-gcc15
submodules: 'recursive'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: ${{ inputs.timeout }}
Expand All @@ -55,20 +64,22 @@ jobs:
# Allows failure in `echo | jq | while read` pipeline to bubble up and fail the workflow
set -o pipefail

echo '${{ inputs.qemu-cpu }}' | jq -r '.[]' | while IFS= read -r qemu_cpu; do
export QEMU_CPU="${qemu_cpu}"
export GCC_VERSION=14
echo '${{ inputs.qemu-cpu-ext }}' | jq -r '.[]' | while IFS= read -r qemu_cpu_ext; do
bash .ci/scripts/test_riscv_qemu.sh \
--model="${{ inputs.model }}" \
${{ inputs.xnnpack && '--xnnpack --verbose-xnnpack' || '' }} \
--backend="${{ inputs.backend }}" \
--os="${{ inputs.os }}" \
--arch="${{ inputs.arch }}" \
--qemu-cpu-ext="${qemu_cpu_ext}" \
${{ inputs.backend == 'xnnpack' && '--verbose-xnnpack' || '' }} \
${{ inputs.quantize && '--quantize' || '' }}

# We only generate riscv_test/${{ inputs.model }}_riscv.etdump.json from `--verbose-xnnpack`.
if ${{ inputs.xnnpack }}; then
# Generate markdown table from riscv_test/${{ inputs.model }}_riscv.etdump.json, sorted by sum_ms
# We only generate riscv_test/${{ inputs.model }}${{ inputs.quantize && '_q' || '' }}_${{ inputs.backend }}_${{ inputs.os }}_${{ inputs.arch }}_riscv.etdump.json from `--verbose-xnnpack`.
if [[ "${{ inputs.backend }}" == "xnnpack" ]]; then
# Generate markdown table from riscv_test/${{ inputs.model }}${{ inputs.quantize && '_q' || '' }}_${{ inputs.backend }}_${{ inputs.os }}_${{ inputs.arch }}_riscv.etdump.json, sorted by sum_ms
(
etdump_json="riscv_test/${{ inputs.model }}_riscv.etdump.json"
echo "### Model=${{ inputs.model }} XNNPACK=${{ inputs.xnnpack }} Quantize=${{ inputs.quantize }} QEMU_CPU='${QEMU_CPU}'"
etdump_json="riscv_test/${{ inputs.model }}${{ inputs.quantize && '_q' || '' }}_${{ inputs.backend }}_${{ inputs.os }}_${{ inputs.arch }}_riscv.etdump.json"
echo "### Model=${{ inputs.model }} Quantize=${{ inputs.quantize }} Backend=${{ inputs.backend }} OS=${{ inputs.os }} Arch=${{ inputs.arch }}${qemu_cpu_ext:+,${qemu_cpu_ext}}"
jq -r '
def r3: (. * 1000 | round) / 1000;
["Section","Op","Count","Sum (ms)","Avg (ms)","Max (ms)","Microkernels"],
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
executorch-ubuntu-22.04-mediatek-sdk,
executorch-ubuntu-22.04-clang12-android,
executorch-ubuntu-24.04-gcc14,
executorch-ubuntu-26.04-gcc15,
]
include:
- docker-image-name: executorch-ubuntu-22.04-gcc11-aarch64
Expand Down
62 changes: 37 additions & 25 deletions .github/workflows/riscv64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test RISC-V Backend
name: Test RISC-V

on:
push:
Expand All @@ -10,8 +10,9 @@ on:
pull_request:
paths:
- .github/workflows/riscv64.yml
- .github/workflows/_test_riscv.yml
- .ci/scripts/test_riscv_qemu.sh
- tools/cmake/preset/riscv64_linux.cmake
- tools/cmake/preset/riscv64_*.cmake
- examples/riscv/**
workflow_dispatch:
schedule:
Expand All @@ -28,39 +29,50 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- { model: add, xnnpack: false, quantize: false }
- { model: add, xnnpack: true, quantize: false }
- { model: mv2, xnnpack: false, quantize: false }
- { model: mv2, xnnpack: true, quantize: false }
- { model: mv2, xnnpack: true, quantize: true }
- { model: mobilebert, xnnpack: false, quantize: false }
- { model: mobilebert, xnnpack: true, quantize: false }
- { model: mobilebert, xnnpack: true, quantize: true }
- { model: llama2, xnnpack: false, quantize: false }
- { model: llama2, xnnpack: true, quantize: false }
- { model: llama2, xnnpack: true, quantize: true }
- { model: resnet18, xnnpack: false, quantize: false }
- { model: resnet18, xnnpack: true, quantize: false }
- { model: resnet18, xnnpack: true, quantize: true }
model:
- add
- mv2
- mobilebert
- llama2
- resnet18
- yolo26
quantize: [true, false]
backend: [portable, xnnpack]
os: [linux, baremetal]
arch: [rv64, rv32]
exclude:
# Disable quantization testing with Portable Kernels
- { backend: portable, quantize: true }
# XNNPACK needs pthreads + dynamic loading (no baremetal) and ships no rv32 microkernels.
- { backend: xnnpack, os: baremetal }
- { backend: xnnpack, arch: rv32 }
# No riscv32-linux-gnu cross is packaged on Ubuntu.
- { os: linux, arch: rv32 }
# No quantization recipe for Yolo26.
- { model: yolo26, quantize: true }
permissions:
id-token: write
contents: read
with:
model: ${{ matrix.model }}
xnnpack: ${{ matrix.xnnpack }}
quantize: ${{ matrix.quantize }}
# If XNNPACK, test with multiple RVV length, disabled otherwise
qemu-cpu: >-
backend: ${{ matrix.backend }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
# JSON array of QEMU -cpu *extension* strings (no rv32/rv64 prefix - that
# comes from `arch`). The script splices them as `<arch>,<ext>`. xnnpack
# benefits from RVV so it sweeps multiple vlen; everything else just uses
# the plain base ISA.
qemu-cpu-ext: >-
${{
case(
matrix.xnnpack, '[
"rv64,zba=true,zbb=true,zbs=true,v=true,vlen=128,elen=64,vext_spec=v1.0",
"rv64,zba=true,zbb=true,zbs=true,v=true,vlen=256,elen=64,vext_spec=v1.0",
"rv64,zba=true,zbb=true,zbs=true,v=true,vlen=512,elen=64,vext_spec=v1.0"
matrix.backend == 'xnnpack', '[
"zba=true,zbb=true,zbs=true,v=true,vlen=128,elen=64,vext_spec=v1.0",
"zba=true,zbb=true,zbs=true,v=true,vlen=256,elen=64,vext_spec=v1.0",
"zba=true,zbb=true,zbs=true,v=true,vlen=512,elen=64,vext_spec=v1.0"
]',
'[
"rv64,zba=true,zbb=true,zbs=true,v=false"
"zba=true,zbb=true,zbs=true,v=false"
]'
)
}}
2 changes: 2 additions & 0 deletions .lintrunner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ include_patterns = [
'backends/arm/**/*.cpp',
'backends/arm/**/*.h',
'backends/arm/**/*.hpp',
'backends/cortex_m/**/*.cpp',
'backends/cortex_m/**/*.h',
'examples/arm/**/*.cpp',
'examples/arm/**/*.h',
'examples/arm/**/*.hpp',
Expand Down
9 changes: 9 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,15 @@
"rhs": "Linux"
}
},
{
"name": "riscv64-baremetal",
"displayName": "Build ExecuTorch for riscv64 baremetal (cross-compile)",
"inherits": ["common"],
"cacheVariables": {
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/riscv64_baremetal.cmake",
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/examples/riscv/riscv64-unknown-elf-toolchain.cmake"
}
},
{
"name": "mlx",
"displayName": "Build MLX delegate",
Expand Down
Loading
Loading