Skip to content

Conversation

@psiddh
Copy link
Contributor

@psiddh psiddh commented Oct 16, 2025

Summary

Add Pico2 Tutorials on Raspberry Pi

[PLEASE REMOVE] See CONTRIBUTING.md's Pull Requests for ExecuTorch PR guidelines.

[PLEASE REMOVE] If this PR closes an issue, please add a Fixes #<issue-id> line.

[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: " label. For a list of available release notes labels, check out CONTRIBUTING.md's Pull Requests.

Test plan

[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 16, 2025

🔗 Helpful Links

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

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

❌ 2 New Failures, 20 Pending

As of commit c11c5b3 with merge base 1489d4f (image):

NEW FAILURES - The following jobs have failed:

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 Oct 16, 2025
@psiddh psiddh requested a review from digantdesai October 16, 2025 13:02
@github-actions
Copy link

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.

@psiddh psiddh changed the title Pico main Add Pico2 Tutorials on Raspberry Pi Oct 16, 2025
Copy link
Member

@GregoryComer GregoryComer left a comment

Choose a reason for hiding this comment

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

Looks good to me. I left a few small nits comments.

@@ -0,0 +1,199 @@
# Pico2: A simple MNIST Tutorial

Deploy your PyTorch models directly to Raspberry Pi Pico2 microcontroller with ExecuTorch and Infer.
Copy link
Member

Choose a reason for hiding this comment

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

Is Infer just referring to inference in this case, or is it some specific noun? Wording seems to imply that Infer is a separate tool or library.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed Infer

python export_mlp_mnist.py # Creates balanced_tiny_mlp_mnist.pte
```

- **Note:** This is hand-crafted MNIST Classifier (proof-of-concept), and not production trained.This tiny MLP recognizes digits 0, 1, 4, and 7 using manually designed feature detectors.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Missing a space in "production trained.This..."?


- Train real models → Replace hand-crafted weights
- Optimize further → INT8 quantization, pruning
- Deploy fleet → Mass production ready
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Reads slightly weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Worded it better

#### Important Caveats:

- Memory constraints - Models must fit in 520KB SRAM
- Memory constraints - Models must fit in 520KB SRAMn (Pico2)
Copy link
Member

Choose a reason for hiding this comment

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

Is the n intended in SRAMn?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@psiddh
Copy link
Contributor Author

psiddh commented Oct 17, 2025

@pytorchbot cherry-pick --onto release/1.0 -c docs

@psiddh psiddh merged commit b30ad01 into pytorch:main Oct 17, 2025
135 of 138 checks passed
GregoryComer pushed a commit to GregoryComer/executorch that referenced this pull request Oct 22, 2025
### Summary
Add Pico2 Tutorials on Raspberry Pi 

[PLEASE REMOVE] See [CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests)
for ExecuTorch PR guidelines.

[PLEASE REMOVE] If this PR closes an issue, please add a `Fixes
#<issue-id>` line.

[PLEASE REMOVE] If this PR introduces a fix or feature that should be
the upcoming release notes, please add a "Release notes: <area>" label.
For a list of available release notes labels, check out
[CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests).

### Test plan
[PLEASE REMOVE] How did you test this PR? Please write down any manual
commands you used and note down tests that you have written if
applicable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants