Skip to content

Commit 9894ebb

Browse files
committed
Update
[ghstack-poisoned]
2 parents 2aec0ff + 8ef378b commit 9894ebb

163 files changed

Lines changed: 6851 additions & 1861 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
release/2.14
1+
ea89e4e90dc68302e8ef5cba3ddbdaa9d50d9512

.ci/docker/common/install_android.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ install_sdk() {
7979
yes | /opt/cmdline-tools/bin/sdkmanager --sdk_root="${SDK_INSTALLATION_DIR}" --install "build-tools;35.0.0"
8080
# And some more tools for future emulator tests
8181
yes | /opt/cmdline-tools/bin/sdkmanager --sdk_root="${SDK_INSTALLATION_DIR}" --install "platform-tools"
82-
# The 'tools' package (emulator) is not available on aarch64
83-
if [ "$(uname -m)" != "aarch64" ]; then
84-
yes | /opt/cmdline-tools/bin/sdkmanager --sdk_root="${SDK_INSTALLATION_DIR}" --install "tools"
85-
fi
82+
# Google withdrew the 'tools' package, so installing it fails under set -e.
83+
# cmdline-tools and platform-tools above replace it, and this image neither
84+
# installs nor runs an emulator.
8685
}
8786

8887
install_prerequiresites

.ci/scripts/tests/test_cuda_workflow.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,17 @@ def test_build_matrix_preserves_existing_cuda_versions(self):
3939
)
4040
self.assertEqual(job["with"]["gpu-arch-version"], "${{ matrix.cuda-version }}")
4141

42-
def test_cuda134_driver_uses_matching_workflow_and_action_revision(self):
42+
def test_cuda_builds_take_the_node_driver_on_an_unpinned_v3(self):
43+
# This job used to pin linux_job_v2 to a test-infra SHA because that was
44+
# the only ref carrying driver-version / driver-download-url, and it
45+
# installed R615 for the 13.4 cell. On OSDC the driver belongs to the
46+
# node and a pod cannot replace it, so the job takes what the node has.
4347
job = WORKFLOW["jobs"]["test-cuda-builds"]
44-
workflow, revision = job["uses"].split("@")
4548
self.assertEqual(
46-
workflow, "pytorch/test-infra/.github/workflows/linux_job_v2.yml"
47-
)
48-
self.assertRegex(revision, r"^[0-9a-f]{40}$")
49-
self.assertEqual(job["with"]["test-infra-ref"], revision)
50-
self.assertEqual(
51-
job["with"]["driver-version"],
52-
"${{ matrix.cuda-version == '13.4' && '615.71.09' || '580.65.06' }}",
53-
)
54-
self.assertEqual(
55-
job["with"]["driver-download-url"],
56-
"${{ matrix.cuda-version == '13.4' && "
57-
"'https://download.nvidia.com/XFree86/Linux-x86_64/615.71.09/"
58-
"NVIDIA-Linux-x86_64-615.71.09.run' || '' }}",
49+
job["uses"], "pytorch/test-infra/.github/workflows/linux_job_v3.yml@main"
5950
)
51+
for pin in ("test-infra-ref", "driver-version", "driver-download-url"):
52+
self.assertNotIn(pin, job["with"])
6053

6154
def test_cuda134_runtime_update_precedes_build_and_propagates_failure(self):
6255
script = WORKFLOW["jobs"]["test-cuda-builds"]["with"]["script"]

.ci/scripts/wheel/test_cpp_sdk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,8 @@ def test_shipped_headers_have_implementations(work_dir: Path) -> None:
10981098
"#define ET_USE_THREADPOOL\n"
10991099
"#include <executorch/runtime/kernel/thread_parallel_interface.h>\n"
11001100
"using namespace executorch::extension;\n"
1101-
"int main() { return parallel_for(0, 1, 1, [](int64_t, int64_t) {}) ? 0 : 1; }\n"
1101+
"int main() { return get_thread_count() > 0 && "
1102+
"parallel_for(0, 1, 1, [](int64_t, int64_t) {}) ? 0 : 1; }\n"
11021103
),
11031104
}
11041105

.github/workflows/_test_backend.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ jobs:
9090
package-golden-artifacts:
9191
if: ${{ inputs.run-linux && inputs.save-goldens }}
9292
needs: test-backend-linux
93-
runs-on: linux.2xlarge
93+
# Repackaging artifacts needs no ExecuTorch toolchain, so this runs on a
94+
# GitHub-hosted runner rather than moving to OSDC; the S3 upload that used
95+
# to ride on the EC2 instance role assumes role/arc through OIDC instead.
96+
runs-on: ubuntu-latest
97+
permissions:
98+
id-token: write
99+
contents: read
94100
steps:
95101
- name: Download model test artifacts
96102
uses: actions/download-artifact@v4
@@ -124,6 +130,13 @@ jobs:
124130
echo "No golden artifacts found."
125131
fi
126132
133+
- name: Configure AWS credentials
134+
if: ${{ hashFiles('golden_artifacts_*.zip') != '' }}
135+
uses: aws-actions/configure-aws-credentials@v4
136+
with:
137+
role-to-assume: arn:aws:iam::308535385114:role/arc
138+
aws-region: us-east-1
139+
127140
- name: Upload golden artifacts to S3
128141
uses: seemethere/upload-artifact-s3@v5
129142
if: ${{ hashFiles('golden_artifacts_*.zip') != '' }}

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ on:
4040
- cron: 0 10 * * *
4141

4242
jobs:
43+
docker-image:
44+
name: Resolve CI docker image
45+
uses: ./.github/workflows/_docker-image.yml
46+
4347
check-if-aar-exists:
4448
name: check-if-aar-exists
4549
runs-on: ubuntu-22.04
@@ -71,16 +75,16 @@ jobs:
7175
7276
build-aar:
7377
name: build-aar
74-
needs: check-if-aar-exists
78+
needs: [docker-image, check-if-aar-exists]
7579
if: ${{ !github.event.pull_request.head.repo.fork && needs.check-if-aar-exists.outputs.should-skip != 'true' }}
76-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
80+
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
7781
secrets: inherit
7882
permissions:
7983
id-token: write
8084
contents: read
8185
with:
8286
secrets-env: EXECUTORCH_MAVEN_SIGNING_KEYID EXECUTORCH_MAVEN_SIGNING_PASSWORD EXECUTORCH_MAVEN_CENTRAL_PASSWORD EXECUTORCH_MAVEN_CENTRAL_USERNAME EXECUTORCH_MAVEN_SIGNING_GPG_KEY_CONTENTS
83-
docker-image: ci-image:executorch-ubuntu-22.04-clang12-android
87+
docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-clang12-android-${{ needs.docker-image.outputs.ci-docker-hash }}
8488
submodules: 'recursive'
8589
ref: ${{ github.sha }}
8690
timeout: 90

.github/workflows/apple.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,13 @@ jobs:
126126
# Upload the test demo app to S3
127127
upload-demo-ios:
128128
needs: build-demo-ios
129-
runs-on: linux.2xlarge
129+
# Moving an artifact from GitHub to S3 needs no ExecuTorch toolchain, so
130+
# this runs on a GitHub-hosted runner rather than moving to OSDC; the upload
131+
# that used to ride on the EC2 instance role assumes role/arc through OIDC.
132+
runs-on: ubuntu-latest
133+
permissions:
134+
id-token: write
135+
contents: read
130136
steps:
131137
- name: Download the artifacts from GitHub
132138
uses: actions/download-artifact@v4
@@ -142,6 +148,12 @@ jobs:
142148
set -eux
143149
ls -lah ./
144150
151+
- name: Configure AWS credentials
152+
uses: aws-actions/configure-aws-credentials@v4
153+
with:
154+
role-to-assume: arn:aws:iam::308535385114:role/arc
155+
aws-region: us-east-1
156+
145157
- name: Upload the artifacts to S3
146158
uses: seemethere/upload-artifact-s3@v5
147159
with:
@@ -163,8 +175,8 @@ jobs:
163175
uses: pytorch/test-infra/.github/workflows/mobile_job.yml@main
164176
with:
165177
device-type: ios
166-
# For iOS testing, the runner just needs to call AWS Device Farm, so there is no need to run this on macOS
167-
runner: linux.2xlarge
178+
# For iOS testing, the runner just needs to call AWS Device Farm, so there is no need to run this on macOS.
179+
runner: ubuntu-latest
168180
test-infra-ref: main
169181
# This is the ARN of ExecuTorch project on AWS
170182
project-arn: arn:aws:devicefarm:us-west-2:308535385114:project:02a2cf0f-6d9b-45ee-ba1a-a086587469e6

.github/workflows/build-cadence-runner.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,31 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
jobs:
22+
docker-image:
23+
name: Resolve CI docker image
24+
uses: ./.github/workflows/_docker-image.yml
25+
2226
# Same-repo PRs run on pull_request, which reads the PR's own workflow AND code
2327
# -- so CI changes, new test jobs, code, and tests are all validated pre-merge.
2428
# Fork PRs can't get credentials (OIDC) on pull_request, so Meta-exported forks
2529
# (labeled CLA Signed + meta-exported) run on pull_request_target instead. The
2630
# run condition is inlined per job (GitHub Actions has no YAML anchors and env
2731
# is unavailable in job-level if), so keep the copies in sync.
2832
cpu-build:
33+
needs: docker-image
2934
if: >-
3035
github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' ||
3136
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
3237
(github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository &&
3338
contains(github.event.pull_request.labels.*.name, 'CLA Signed') && contains(github.event.pull_request.labels.*.name, 'meta-exported'))
34-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
39+
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
3540
permissions:
3641
id-token: write
3742
contents: read
3843
with:
3944
job-name: build
40-
runner: linux.2xlarge
41-
docker-image: ci-image:executorch-ubuntu-22.04-clang12
45+
runner: mt-l-x86iavx512-8-64
46+
docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-clang12-${{ needs.docker-image.outputs.ci-docker-hash }}
4247
submodules: recursive
4348
ref: ${{ (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.pull_request.head.sha || github.sha }}
4449
timeout: 90

.github/workflows/build-cmsis-pack.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,20 @@ concurrency:
4444
cancel-in-progress: true
4545

4646
jobs:
47+
docker-image:
48+
name: Resolve CI docker image
49+
uses: ./.github/workflows/_docker-image.yml
50+
4751
build-cmsis-pack:
52+
needs: docker-image
4853
name: build-cmsis-pack
49-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
54+
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
5055
permissions:
5156
id-token: write
5257
contents: read
5358
with:
54-
runner: linux.2xlarge
55-
docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk
59+
runner: mt-l-x86iavx512-8-64
60+
docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-arm-sdk-${{ needs.docker-image.outputs.ci-docker-hash }}
5661
submodules: 'recursive'
5762
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
5863
timeout: 60

.github/workflows/build-presets.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16+
docker-image:
17+
name: Resolve CI docker image
18+
uses: ./.github/workflows/_docker-image.yml
19+
1620
apple:
1721
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
1822
strategy:
@@ -34,16 +38,20 @@ jobs:
3438
${CONDA_RUN} cmake --build cmake-out -j$(( $(sysctl -n hw.ncpu) - 1 ))
3539
3640
zephyr:
37-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
41+
needs: docker-image
42+
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
43+
permissions:
44+
id-token: write
45+
contents: read
3846
strategy:
3947
fail-fast: false
4048
matrix:
4149
preset: [zephyr]
4250
with:
4351
job-name: build
4452
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
45-
runner: linux.2xlarge
46-
docker-image: ci-image:executorch-ubuntu-22.04-zephyr-sdk
53+
runner: mt-l-x86iavx512-8-64
54+
docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-zephyr-sdk-${{ needs.docker-image.outputs.ci-docker-hash }}
4755
submodules: recursive
4856
timeout: 90
4957
script: |
@@ -73,26 +81,30 @@ jobs:
7381
cmake --preset ${{ matrix.preset }}
7482
cmake --build cmake-out -j$(( $(nproc) - 1 ))
7583
linux:
76-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
84+
needs: docker-image
85+
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
86+
permissions:
87+
id-token: write
88+
contents: read
7789
strategy:
7890
fail-fast: false
7991
matrix:
8092
preset: [linux, pybind, llm]
81-
runner: [linux.2xlarge, linux.arm64.2xlarge]
93+
runner: [mt-l-x86iavx512-8-64, mt-l-arm64g4-16-62]
8294
docker-image: [executorch-ubuntu-22.04-clang12, executorch-ubuntu-22.04-gcc11-aarch64]
8395
# Excluding specific runner + docker image combinations that don't make sense:
84-
# - Excluding the ARM64 gcc image on the x86 runner (linux.2xlarge)
85-
# - Excluding the x86 clang image on the ARM64 runner (linux.arm64.2xlarge)
96+
# - Excluding the ARM64 gcc image on the x86 runner
97+
# - Excluding the x86 clang image on the ARM64 runner
8698
exclude:
87-
- runner: linux.2xlarge
99+
- runner: mt-l-x86iavx512-8-64
88100
docker-image: executorch-ubuntu-22.04-gcc11-aarch64
89-
- runner: linux.arm64.2xlarge
101+
- runner: mt-l-arm64g4-16-62
90102
docker-image: executorch-ubuntu-22.04-clang12
91103
with:
92104
job-name: build
93105
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
94106
runner: ${{ matrix.runner }}
95-
docker-image: ci-image:${{ matrix.docker-image }}
107+
docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:${{ matrix.docker-image }}-${{ needs.docker-image.outputs.ci-docker-hash }}
96108
submodules: recursive
97109
timeout: 90
98110
script: |

0 commit comments

Comments
 (0)