Skip to content

Commit 4c66c3b

Browse files
committed
Update (base update)
[ghstack-poisoned]
2 parents 6d91872 + 21554e5 commit 4c66c3b

504 files changed

Lines changed: 13585 additions & 3402 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.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright (c) Qualcomm Innovation Center, Inc.
2+
# All rights reserved
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
$ErrorActionPreference = "Stop"
8+
9+
conda create --yes --quiet -n et python=3.12
10+
conda activate et
11+
12+
# Install CI requirements
13+
pip install -r .ci/docker/requirements-ci.txt
14+
15+
# Provision the QNN SDK
16+
if ($env:QNN_SDK_ROOT -and (Test-Path -Path $env:QNN_SDK_ROOT)) {
17+
Write-Host "Using existing QNN SDK at $env:QNN_SDK_ROOT"
18+
} else {
19+
# Resolve the QNN_VERSION and QNN_ZIP_URL
20+
$qnnInfo = python -c "import sys; sys.path.insert(0, r'backends\qualcomm\scripts'); import download_qnn_sdk as d; print(d.QNN_VERSION); print(d.QNN_ZIP_URL)"
21+
if ($LASTEXITCODE -ne 0 -or $qnnInfo.Count -lt 2) {
22+
Write-Error "Failed to read QNN_VERSION and QNN_ZIP_URL from download_qnn_sdk.py."
23+
exit 1
24+
}
25+
$qnnVersion = $qnnInfo[0].Trim()
26+
$qnnZipUrl = $qnnInfo[1].Trim()
27+
28+
$qnnInstallDir = Join-Path $env:TEMP "qnn"
29+
New-Item -Path $qnnInstallDir -ItemType Directory -Force | Out-Null
30+
$qnnZip = Join-Path $env:TEMP "qnn_sdk.zip"
31+
Write-Host "Downloading QNN SDK v$qnnVersion ..."
32+
$ProgressPreference = "SilentlyContinue"
33+
Invoke-WebRequest -Uri $qnnZipUrl -OutFile $qnnZip
34+
Write-Host "Extracting QNN SDK ..."
35+
Expand-Archive -Path $qnnZip -DestinationPath $qnnInstallDir -Force
36+
Remove-Item -Path $qnnZip -Force
37+
38+
$env:QNN_SDK_ROOT = Join-Path $qnnInstallDir "qairt\$qnnVersion"
39+
Write-Host "Set QNN_SDK_ROOT=$env:QNN_SDK_ROOT"
40+
}
41+
42+
if (-not (Test-Path -Path (Join-Path $env:QNN_SDK_ROOT "include\QNN"))) {
43+
Write-Error "QNN SDK layout unexpected: missing include\QNN under $env:QNN_SDK_ROOT"
44+
exit 1
45+
}
46+
47+
# Test x86_64 Windows host build
48+
.\backends\qualcomm\scripts\build.ps1 -SkipArm64Windows -Release
49+
50+
$x86Artifacts = @(
51+
"build-x86_64-windows\backends\qualcomm\Release\PyQnnManagerAdaptor*.pyd",
52+
"build-x86_64-windows\backends\qualcomm\Release\qnn_executorch_backend.dll",
53+
"build-x86_64-windows\examples\qualcomm\executor_runner\Release\qnn_executor_runner.exe"
54+
)
55+
foreach ($artifact in $x86Artifacts) {
56+
if (-not (Get-ChildItem -Path $artifact -ErrorAction SilentlyContinue)) {
57+
Write-Error "ERROR: x86_64 artifact not found: $artifact"
58+
exit 1
59+
}
60+
}
61+
62+
# The ARM64 MSVC toolchain is currently not installed in the Windows CI
63+
# environment. Enabling this build configuration results in build failures
64+
# due to the missing ARM64 platform definition.
65+
# `.\backends\qualcomm\scripts\build.ps1 -SkipX86Windows -Release`
66+
#
67+
# Temporarily disable this build option until ARM64 MSVC support is available
68+
# in CI. The configuration can be re-enabled in a future update.
69+
70+
Write-Host "PASSED: QNN backend Windows MSVC build completed"

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
// List of authors to exclude
2828
const excludedAuthors = new Set([
2929
"nil-is-all", "tanvirislam-meta", "cbilgin", "kimishpatel", "psiddh", "digantdesai", "SS-JIA", "ahmtox", "mcr229",
30-
"shoumikhin", "manuelcandales", "metascroy", "cccclai", "rohansjoshi", "kirklandsign", "abhinaykukkadapu",
31-
"JacobSzwejbka", "Conarnar", "rascani", "lucylq", "larryliu0820", "BujSet", "Gasoonjia", "Juntian777", "guangy10",
30+
"shoumikhin", "manuelcandales", "metascroy", "cccclai", "rohansjoshi", "kirklandsign", "abhinaykukkadapu", "JacobSzwejbka",
31+
"Conarnar", "rascani", "kiymetakdemir", "JCNTH", "lucylq", "larryliu0820", "BujSet", "Gasoonjia", "Juntian777", "guangy10",
3232
"jackzhxng", "GregoryComer", "leafs1", "swolchok", "mergennachin", "tarun292", "byjlw", "jathu", "Jack-Khuu", "georgehong",
33-
"zhenyan-zhang-meta", "silverguo", "harishs88ss", "AlannaBurke", "dbort", "huydhn", "mcremon-meta", "trivedivivek",
34-
"angelayi", "helunwencser", "hsharma35", "zhxchen17", "iseeyuan", "svekars", "nathanaelsee", "dulinriley",
33+
"zhenyan-zhang-meta", "silverguo", "harishs88ss", "AlannaBurke", "Doggeral", "laithsakka", "Reubend", "dbort", "huydhn", "mcremon-meta",
34+
"trivedivivek", "angelayi", "helunwencser", "hsharma35", "zhxchen17", "iseeyuan", "svekars", "nathanaelsee", "dulinriley",
3535
"jerryzh168", "cmodi-meta", "bigfootjon", "sxu", "ydwu4", "Riandy", "tugsbayasgalan", "bsoyluoglu", "yangw-dev",
3636
"YIWENX14", "namanahuja", "yushangdi", "limintang", "pianpwk", "viveknayakatmeta", "andreanicastro", "JakeStevens",
3737
"gmagogsfm", "zonglinpeng", "eigen-k", "derekxu", "salilsdesai", "skrtskrtfb", "pssrawat", "r-barnes",
@@ -50,7 +50,7 @@ jobs:
5050
"mansnils", "martinlsm", "freddan80", "YufengShi-dudu", "tom-arm", "perheld", "Jerry-Ge", "gggekov", "fumchin", "wwwind",
5151
"benkli01", "Tessil", "maddun01", "Michiel-Olieslagers", "armwaheed", "agrima1304", "emmakujala", "annietllnd",
5252
"MatthiasHertel80", "AlexTawseArm", "jmahbs", "morgolock", "Christoffer-JL", "ArmRyan", "xingguo01", "tgonzalezorlandoarm",
53-
"chizkiyahu", "sarah-blades", "itsMarco-G", "usamahz", "Rob-Hughes-Arm",
53+
"chizkiyahu", "sarah-blades", "itsMarco-G", "usamahz", "Rob-Hughes-Arm", "swha815", "FabulousSuperDude",
5454
"haowhsu-quic", "shewu-quic", "winskuo-quic", "chunit-quic", "DannyYuyang-quic", "chuntl", "thchenqti", "jethroqti",
5555
"chenweng-quic", "qti-horodnic", "qti-mmadhava", "quic-boyuc", "zhaoxul-qti",
5656
"cymbalrush", "DenisVieriu97", "billmguo",

.github/workflows/doc-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ jobs:
104104
repository: pytorch/executorch
105105
download-artifact: docs
106106
ref: gh-pages
107+
# Publish on the host so actions/checkout's persisted credentials are
108+
# available to git push.
109+
run-with-docker: false
107110
timeout: 90
108111
script: |
109112
set -euo pipefail

.github/workflows/pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ jobs:
14271427
docker-image: ci-image:executorch-ubuntu-22.04-clang12
14281428
submodules: 'recursive'
14291429
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
1430-
timeout: 120
1430+
timeout: 150
14311431
script: |
14321432
set -eux
14331433
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Test QNN Windows MSVC build
2+
3+
# Changes to backends/qualcomm/, top-level CMake files, extension/,
4+
# examples/, runtime/, and other shared infrastructure can affect
5+
# the QNN Windows MSVC build. Rather than maintaining a fragile list
6+
# of relevant path filters, this workflow runs on every PR to ensure
7+
# build coverage.
8+
#
9+
# Reasons for keeping qnn-windows-msvc.yml separate from test-backend-qnn.yml:
10+
#
11+
# - Two workflows are triggered by different tags.
12+
# - test-backend-qnn.yml runs under ciflow/nightly/*.
13+
# - qnn-windows-msvc.yml runs under ciflow/trunk/*.
14+
# Merging them would introduce the behavior change to the existing flow.
15+
#
16+
# - Workflow reruns are more efficient when they remain separate.
17+
# A Windows-only failure would still require rerunning jobs in test-backend-qnn.yml
18+
# if they are combined into a single workflow, resulting in unnecessary CI
19+
# resource consumption (and vice versa).
20+
#
21+
# - Failure signals are clearer when the workflows are isolated.
22+
# With a combined workflow, additional inspection of the job list would be required to
23+
# identify the root cause of a failing status. Keeping the workflows separate provides
24+
# distinct top-level CI statuses, making the failure domain immediately obvious.
25+
#
26+
# For now, qnn-windows-msvc.yml should remain separate from trunk.yml and pull.yml:
27+
#
28+
# - trunk.yml is only triggered for PRs that modify files matching:
29+
# - .ci/docker/ci_commit_pins/pytorch.txt
30+
# - .ci/scripts/**
31+
# - zephyr/**
32+
# As a result, trunk.yml would not run for PRs that touch backends/qualcomm/**.
33+
#
34+
# - pull.yml runs on every PR without path filters, but currently contains only
35+
# Linux jobs. Keeping qnn-windows-msvc.yml as a standalone workflow provides
36+
# independent status visibility and more efficient reruns for QNN Windows build.
37+
#
38+
# Once the QNN Windows CI path has demonstrated sufficient stability, we can revisit
39+
# whether it makes sense to consolidate qnn-windows-msvc.yml into pull.yml.
40+
41+
on:
42+
push:
43+
branches:
44+
- main
45+
- release/*
46+
tags:
47+
- ciflow/trunk/*
48+
pull_request:
49+
workflow_dispatch:
50+
51+
concurrency:
52+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
53+
cancel-in-progress: true
54+
55+
permissions:
56+
contents: read
57+
58+
jobs:
59+
build-qnn-windows-msvc:
60+
name: build-qnn-windows-msvc
61+
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
62+
with:
63+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
64+
timeout: 90
65+
script: |
66+
git config --global http.sslBackend openssl
67+
git submodule update --init --recursive
68+
conda init powershell
69+
powershell -Command "& {
70+
Set-PSDebug -Trace 1
71+
\$ErrorActionPreference = 'Stop'
72+
\$PSNativeCommandUseErrorActionPreference = \$true
73+
.ci/scripts/build-qnn-windows-msvc.ps1
74+
}"
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
23

34
oncall("executorch")
45

5-
runtime.python_library(
6+
fbcode_target(
7+
_kind = runtime.python_library,
68
name = "passes",
79
srcs = [
8-
"replace_view_copy_with_view.py",
10+
"replace_view_copy_with_view.py",
911
],
1012
visibility = [
1113
"//executorch/...",

backends/aoti/slim/factory/test/test_from_etensor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
namespace executorch::backends::aoti::slim {
2222

23-
using executorch::runtime::Error;
24-
using executorch::runtime::TensorShapeDynamism;
2523
using executorch::runtime::etensor::ScalarType;
2624
using executorch::runtime::testing::TensorFactory;
2725

backends/apple/coreml/runtime/delegate/executorch_operations.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#import <memory>
1414

1515
namespace executorch::core_ml_backend_delegate {
16-
using executorch::runtime::get_backend_class;
1716

1817
static std::unique_ptr<executorch::backends::coreml::CoreMLBackendDelegate> backendInterfaceLazy_;
1918

backends/apple/coreml/runtime/test/CoreMLBackendDelegateTests.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
static constexpr size_t kRuntimeMemorySize = 50 * 1024U * 1024U; // 50 MB
1919

2020
using namespace executorch::runtime;
21-
using executorch::runtime::testing::TensorFactory;
2221

2322
namespace {
2423
// TODO: Move the following methods to a utility class, so that it can be shared with `executor_runner.main.mm`

backends/apple/coreml/runtime/test/coreml_backend_options_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <gtest/gtest.h>
1414

1515
using executorch::backends::coreml::LoadOptionsBuilder;
16-
using executorch::runtime::BackendOption;
1716
using executorch::runtime::Error;
1817
using executorch::runtime::kMaxOptionValueLength;
1918
using executorch::runtime::LoadBackendOptionsMap;

0 commit comments

Comments
 (0)