Skip to content

Commit a4492ba

Browse files
author
pytorchbot
committed
2026-06-11 nightly release (eb851a5)
1 parent 6f46374 commit a4492ba

108 files changed

Lines changed: 2800 additions & 1124 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/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ esac
102102
TORCH_VERSION=$(cat ci_commit_pins/pytorch.txt)
103103
BUILD_DOCS=1
104104

105-
if [[ "${GCC_VERSION:-}" == "11" && -z "${SKIP_PYTORCH:-}" ]]; then
105+
if [[ -n "${GCC_VERSION:-}" && -z "${SKIP_PYTORCH:-}" ]]; then
106106
PYTORCH_BUILD_MAX_JOBS=6
107107
fi
108108

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
# Copyright (c) Qualcomm Innovation Center, Inc.
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 -eux
9+
10+
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"
11+
12+
setup_android_ndk
13+
install_qnn
14+
install_hexagon_sdk
15+
16+
bash backends/qualcomm/scripts/build.sh \
17+
--build_direct_mode 3 --soc_model SM8750 \
18+
--skip_x86_64 --skip_linux_android \
19+
--release
20+
21+
ARTIFACT="build-direct/backends/qualcomm/libqnn_executorch_backend.so"
22+
if [ ! -f "${ARTIFACT}" ]; then
23+
echo "ERROR: direct-mode build did not produce ${ARTIFACT}" >&2
24+
exit 1
25+
fi
26+
27+
MAX_SIZE_BYTES=$((200 * 1024))
28+
ARTIFACT_SIZE=$(stat -c%s "${ARTIFACT}")
29+
if [ "${ARTIFACT_SIZE}" -gt "${MAX_SIZE_BYTES}" ]; then
30+
echo "ERROR: ${ARTIFACT} is ${ARTIFACT_SIZE} bytes, exceeds ${MAX_SIZE_BYTES}-byte (200 KiB) limit" >&2
31+
exit 1
32+
fi
33+
echo "PASSED: direct-mode build produced ${ARTIFACT} (${ARTIFACT_SIZE} bytes, under ${MAX_SIZE_BYTES}-byte limit)"

.ci/scripts/test_cortex_m_e2e.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
set -eu
1515

1616
MODEL=$1
17+
TARGET=${2:-cortex-m55}
1718
script_dir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
1819
et_root_dir=$(realpath "${script_dir}/../..")
1920

20-
# Quantization is the default for the cortex-m55 target; run.sh's
21+
# Quantization is the default for cortex-m targets; run.sh's
2122
# arg parser only recognizes --no_quantize, so we omit any explicit flag.
2223
export ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA=True
2324
bash "${et_root_dir}/examples/arm/run.sh" \
2425
--model_name="${MODEL}" \
25-
--target=cortex-m55 \
26+
--target="${TARGET}" \
2627
--bundleio

.ci/scripts/wheel/pre_build_script.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Copyright (c) Meta Platforms, Inc. and affiliates.
33
# All rights reserved.
44
#
5+
# Copyright 2026 Arm Limited and/or its affiliates.
6+
#
57
# This source code is licensed under the BSD-style license found in the
68
# LICENSE file in the root directory of this source tree.
79

@@ -57,6 +59,18 @@ fi
5759

5860
"${GITHUB_WORKSPACE}/${REPOSITORY}/install_requirements.sh" --example
5961

62+
# Enable VGF in pybind wheel builds when the platform-specific build input is
63+
# available from pip.
64+
if [[ "$UNAME_S" == "Linux" || "$UNAME_S" == "Darwin" ]]; then
65+
if python3 -m pip install -r \
66+
"${GITHUB_WORKSPACE}/${REPOSITORY}/backends/arm/requirements-arm-vgf-runtime.txt"; then
67+
export EXECUTORCH_PYBIND_ENABLE_VGF=ON
68+
echo "EXECUTORCH_PYBIND_ENABLE_VGF=ON" >> "${GITHUB_ENV}"
69+
else
70+
echo "VGF build dependency unavailable on this platform; building without VGF"
71+
fi
72+
fi
73+
6074
# Download Qualcomm QNN SDK on Linux x86_64 so the wheel build can include the
6175
# QNN backend. The SDK is large, so we download it here (outside CMake) rather
6276
# than during cmake configure.

.github/workflows/_test_cortex_m_e2e.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
description: 'JSON array of model names to run on the Corstone-300 FVP, e.g. ["mv2", "mv3"]'
1212
required: true
1313
type: string
14+
targets:
15+
description: 'JSON array of cortex-m target CPUs to build the runner for, e.g. ["cortex-m55", "cortex-m7", "cortex-m0plus"]'
16+
required: false
17+
type: string
18+
default: '["cortex-m55"]'
1419
timeout:
1520
description: 'Per-matrix-entry timeout in minutes'
1621
required: false
@@ -23,9 +28,10 @@ jobs:
2328
strategy:
2429
matrix:
2530
model: ${{ fromJSON(inputs.models) }}
31+
target: ${{ fromJSON(inputs.targets) }}
2632
fail-fast: false
2733
with:
28-
job-name: ${{ matrix.model }}
34+
job-name: ${{ matrix.model }}-${{ matrix.target }}
2935
runner: linux.2xlarge.memory
3036
docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk
3137
submodules: 'recursive'
@@ -44,4 +50,4 @@ jobs:
4450
source examples/arm/arm-scratch/setup_path.sh
4551
4652
# Export and run model on FVP (run.sh internally builds the test runner).
47-
bash .ci/scripts/test_cortex_m_e2e.sh ${{ matrix.model }}
53+
bash .ci/scripts/test_cortex_m_e2e.sh "${{ matrix.model }}" "${{ matrix.target }}"

.github/workflows/cuda-windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
- .github/workflows/cuda-windows.yml
1717
- backends/cuda/**
1818
- backends/aoti/**
19+
- extension/cuda/**
1920
workflow_dispatch:
2021

2122
concurrency:
@@ -49,6 +50,7 @@ jobs:
4950
(
5051
contains(needs.changed-files.outputs.changed-files, 'backends/cuda') ||
5152
contains(needs.changed-files.outputs.changed-files, 'backends/aoti') ||
53+
contains(needs.changed-files.outputs.changed-files, 'extension/cuda') ||
5254
contains(needs.changed-files.outputs.changed-files, '.github/workflows/cuda-windows.yml') ||
5355
needs.run-decision.outputs.is-full-run == 'true'
5456
)
@@ -150,6 +152,7 @@ jobs:
150152
(
151153
contains(needs.changed-files.outputs.changed-files, 'backends/cuda') ||
152154
contains(needs.changed-files.outputs.changed-files, 'backends/aoti') ||
155+
contains(needs.changed-files.outputs.changed-files, 'extension/cuda') ||
153156
contains(needs.changed-files.outputs.changed-files, '.github/workflows/cuda-windows.yml') ||
154157
needs.run-decision.outputs.is-full-run == 'true'
155158
)

.github/workflows/pull.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,25 @@ jobs:
948948
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
949949
PYTHON_EXECUTABLE=python bash .ci/scripts/test_model.sh ${{ matrix.model }} "cmake" "qnn"
950950
951+
test-qnn-direct-build-linux:
952+
name: test-qnn-direct-build-linux
953+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
954+
permissions:
955+
id-token: write
956+
contents: read
957+
with:
958+
runner: linux.2xlarge
959+
docker-image: ci-image:executorch-ubuntu-22.04-qnn-sdk
960+
submodules: 'recursive'
961+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
962+
timeout: 30
963+
script: |
964+
# The generic Linux job chooses to use base env, not the one setup by the image
965+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
966+
conda activate "${CONDA_ENV}"
967+
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool cmake
968+
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-direct-sdk.sh
969+
951970
test-qnn-testsuite-linux:
952971
name: test-qnn-testsuite-linux
953972
permissions:

.github/workflows/trunk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,3 +1075,4 @@ jobs:
10751075
uses: ./.github/workflows/_test_cortex_m_e2e.yml
10761076
with:
10771077
models: '["mv2", "mv3"]'
1078+
targets: '["cortex-m55", "cortex-m7", "cortex-m0plus"]'

.lintrunner.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ exclude_patterns = [
173173
'extension/asr/runner/transducer_runner.h',
174174
'extension/aten_util/**',
175175
'extension/benchmark/apple/**',
176+
'extension/cuda/**',
176177
'extension/data_loader/**',
177178
'extension/evalue_util/**',
178179
'extension/flat_tensor/**',
@@ -195,7 +196,6 @@ exclude_patterns = [
195196
'kernels/aten/**',
196197
'kernels/optimized/**',
197198
'kernels/portable/**',
198-
'kernels/prim_ops/**',
199199
'kernels/quantized/**',
200200
'kernels/test/**',
201201

@@ -226,6 +226,10 @@ command = [
226226
'--extra-arg=--suppress=toomanyconfigs',
227227
'--extra-arg=--suppress=unusedFunction:*.h',
228228
'--extra-arg=--suppress=unusedFunction:*.hpp',
229+
# Prim ops use the same ExecuTorch macro idioms as portable kernels.
230+
'--extra-arg=--suppress=unknownMacro:*kernels/prim_ops/*',
231+
'--extra-arg=--suppress=syntaxError:*kernels/prim_ops/*',
232+
'--extra-arg=--suppress=unusedFunction:*kernels/prim_ops/*',
229233
'--',
230234
'@{{PATHSFILE}}'
231235
]

CMakeLists.txt

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@ cmake_minimum_required(VERSION 3.24)
4949

5050
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
5151

52-
# Hexagon toolchain with release build complains about code in third party
53-
# libraries.
54-
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "Hexagon" AND "${CMAKE_BUILD_TYPE}"
55-
STREQUAL "Release"
56-
)
57-
add_compile_options(
58-
-Wno-error=format -Wno-error=implicit-int-conversion
59-
-Wno-error=unused-variable -Wno-error=unused-function
60-
)
61-
endif()
62-
6352
# --- ExecuTorch Version ---
6453
# Parse version from version.txt (single source of truth)
6554
file(READ "${EXECUTORCH_ROOT}/version.txt" ET_VERSION_STRING)
@@ -90,6 +79,18 @@ project(executorch
9079
VERSION "${ET_VERSION_MAJOR}.${ET_VERSION_MINOR}.${ET_VERSION_PATCH}"
9180
)
9281

82+
# Hexagon toolchain with release build complains about code in third party
83+
# libraries. Must come after project(), which runs the toolchain file that sets
84+
# CMAKE_SYSTEM_PROCESSOR, and before add_subdirectory(third-party).
85+
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "Hexagon" AND "${CMAKE_BUILD_TYPE}"
86+
STREQUAL "Release"
87+
)
88+
add_compile_options(
89+
-Wno-error=format -Wno-error=implicit-int-conversion
90+
-Wno-error=unused-variable -Wno-error=unused-function
91+
)
92+
endif()
93+
9394
message(
9495
STATUS
9596
"ExecuTorch version: ${ET_VERSION_MAJOR}.${ET_VERSION_MINOR}.${ET_VERSION_PATCH}"
@@ -764,6 +765,20 @@ if(EXECUTORCH_BUILD_CUDA
764765
find_package_torch()
765766
endif()
766767

768+
# Backend-neutral caller-stream guard consumed by the CUDA AOTI backend (and the
769+
# vendored torch-tensorrt delegate). Built before backends/aoti and
770+
# backends/cuda, which link it.
771+
if(EXECUTORCH_BUILD_CUDA)
772+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/cuda)
773+
install(
774+
DIRECTORY extension/cuda/
775+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/executorch/extension/cuda
776+
FILES_MATCHING
777+
PATTERN "*.h"
778+
)
779+
list(APPEND _executorch_extensions extension_cuda)
780+
endif()
781+
767782
# Build common AOTI functionality if needed by CUDA or Metal backends
768783
if(EXECUTORCH_BUILD_CUDA OR EXECUTORCH_BUILD_METAL)
769784
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/aoti)
@@ -1026,6 +1041,10 @@ if(EXECUTORCH_BUILD_PYBIND)
10261041
list(APPEND _dep_libs coremldelegate)
10271042
endif()
10281043

1044+
if(EXECUTORCH_BUILD_VGF)
1045+
list(APPEND _dep_libs vgf_backend)
1046+
endif()
1047+
10291048
if(EXECUTORCH_BUILD_MPS)
10301049
list(APPEND _dep_libs mpsdelegate)
10311050
endif()

0 commit comments

Comments
 (0)