Skip to content

Add Pico2 build validation CI (trunk only)#18900

Merged
psiddh merged 6 commits intopytorch:mainfrom
psiddh:pico2_ci
Apr 15, 2026
Merged

Add Pico2 build validation CI (trunk only)#18900
psiddh merged 6 commits intopytorch:mainfrom
psiddh:pico2_ci

Conversation

@psiddh
Copy link
Copy Markdown
Contributor

@psiddh psiddh commented Apr 15, 2026

Adds two parallel CI jobs that validate FP32 and CMSIS-NN INT8 Pico2 firmware builds on every push to main. Each job exports a model, cross- compiles firmware, and validates the .elf/.uf2 artifacts fit within Pico2 memory limits (520KB SRAM, 4MB flash).

Triggered on push to main when examples/raspberry_pi/pico2/** or backends/cortex_m/** files change, plus a daily schedule and release branches

Adds two parallel CI jobs that validate FP32 and CMSIS-NN INT8 Pico2
firmware builds on every push to main. Each job exports a model, cross-
compiles firmware, and validates the .elf/.uf2 artifacts fit within
Pico2 memory limits (520KB SRAM, 4MB flash).

Triggered on push to main when examples/raspberry_pi/pico2/** or
backends/cortex_m/** files change, plus a daily schedule.

Co-authored-by: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 15, 2026 00:07
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 15, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18900

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures, 2 Pending, 1 Unrelated Failure

As of commit 0ee15b8 with merge base 26e2ab8 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 15, 2026
@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workflow to continuously validate Raspberry Pi Pico2 firmware builds (FP32 and CMSIS-NN INT8), including artifact existence checks and basic memory-size guardrails, to catch regressions from changes in the Pico2 example or Cortex-M backend.

Changes:

  • Introduces a new test-pico2-build.yml workflow with two parallel jobs (FP32 + CMSIS-NN).
  • Each job exports a model, cross-compiles Pico2 firmware, and checks for expected .elf/.uf2 artifacts plus memory-size constraints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test-pico2-build.yml Outdated
Comment thread .github/workflows/test-pico2-build.yml Outdated
Comment thread .github/workflows/test-pico2-build.yml Outdated
Comment thread .github/workflows/test-pico2-build.yml Outdated
Comment thread .github/workflows/test-pico2-build.yml
Comment thread .github/workflows/test-pico2-build.yml
Comment thread .github/workflows/test-pico2-build.yml Outdated
psiddh and others added 2 commits April 14, 2026 17:52
- Use arm-none-eabi-size aggregated totals (text+data for flash,
  data+bss for SRAM) instead of brittle per-section awk parsing
- Increase timeout from 60 to 120 minutes to match other ARM SDK jobs
- Add event_name to concurrency group to prevent cross-event cancellation
- Add .ci/scripts/** and examples/arm/** to path triggers
- CMSIS-NN symbol check now fails the job instead of warning

Co-authored-by: Claude <noreply@anthropic.com>
Temporary: allows testing the workflow on this PR. Remove after
validation.
Copilot AI review requested due to automatic review settings April 15, 2026 00:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workflow to continuously validate Raspberry Pi Pico2 firmware builds (FP32 and CMSIS-NN INT8) and enforce memory-size constraints, helping prevent upstream changes from breaking embedded builds.

Changes:

  • Introduces .github/workflows/test-pico2-build.yml with two parallel CI jobs for FP32 and CMSIS-NN Pico2 firmware builds.
  • Each job exports a model, cross-compiles firmware, and validates .elf/.uf2 artifacts plus SRAM/flash usage thresholds.
  • CMSIS-NN job additionally checks that CMSIS-NN-related symbols are present in the linked binary.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test-pico2-build.yml
Comment thread .github/workflows/test-pico2-build.yml Outdated
Comment thread .github/workflows/test-pico2-build.yml Outdated
Comment thread .github/workflows/test-pico2-build.yml Outdated
psiddh and others added 2 commits April 15, 2026 09:21
CMSIS-NN models contain only cortex_m:: ops which are registered by the
cortex_m backend, not by portable kernel codegen. Passing these to
EXECUTORCH_SELECT_OPS_MODEL produces an empty #include "" in the
generated registration code, failing the build.

Skip SELECT_OPS_FLAGS when --cmsis is used.

Co-authored-by: Claude <noreply@anthropic.com>
- Remove pull_request trigger (testing complete, both jobs passed)
- Use head.sha for PR runs to match repo convention

Co-authored-by: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 15, 2026 18:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds dedicated CI coverage for Raspberry Pi Pico2 firmware builds, ensuring both FP32 and CMSIS-NN INT8 configurations continue to cross-compile and fit within Pico2 memory constraints.

Changes:

  • Update Pico2 firmware build script to skip selective build when CMSIS-NN mode is enabled.
  • Add a new GitHub Actions workflow that exports models, builds Pico2 firmware (FP32 + CMSIS-NN), and validates produced artifacts and memory usage on push/schedule.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
examples/raspberry_pi/pico2/build_firmware_pico.sh Skips selective-build flags when building CMSIS-NN firmware to avoid selective-build incompatibilities with cortex_m ops.
.github/workflows/test-pico2-build.yml New CI workflow running two build-and-validate jobs (FP32 + CMSIS-NN) with artifact presence checks and flash/SRAM size validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test-pico2-build.yml
Comment thread .github/workflows/test-pico2-build.yml
Comment thread .github/workflows/test-pico2-build.yml
Comment thread .github/workflows/test-pico2-build.yml
Comment thread .github/workflows/test-pico2-build.yml
- Add set -euo pipefail to both script blocks so pipeline failures
  in size validation are not masked
- Add workflow file itself to push paths so edits trigger CI

Co-authored-by: Claude <noreply@anthropic.com>
@psiddh psiddh requested a review from GregoryComer April 15, 2026 20:11
@psiddh psiddh merged commit 28c56fe into pytorch:main Apr 15, 2026
413 of 422 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants