Skip to content

Conversation

Juanfi8
Copy link
Contributor

@Juanfi8 Juanfi8 commented May 12, 2025

Example of an external model to be loaded as a module by the aot_arm_compiler.py.
Useful for documentation.

@zingo

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218

@Juanfi8 Juanfi8 requested review from lucylq and jackzhxng as code owners May 12, 2025 08:44
Copy link

pytorch-bot bot commented May 12, 2025

🔗 Helpful Links

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

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

❌ 8 New Failures, 4 Unrelated Failures

As of commit 3d100d7 with merge base a21022c (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was 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.

@facebook-github-bot facebook-github-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 May 12, 2025
@Juanfi8
Copy link
Contributor Author

Juanfi8 commented May 12, 2025

@pytorchbot label "partner: arm"

@pytorch-bot pytorch-bot bot added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label May 12, 2025
Copy link

pytorch-bot bot commented May 13, 2025

To add the ciflow label ciflow/trunk please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.

Copy link
Collaborator

@zingo zingo left a comment

Choose a reason for hiding this comment

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

Nice patch looks great! Thanks. I just have a small request if it's OK?

As its only Arm that support this thing right now would it be OK to move the files to examples/arm/

e.g. from

examples/models/example_export_from_module

to

examples/arm/examples
or
examples/arm/example_modules
or keep the longer folder name if you like.

And as we probably will add a few more test models down the line maybe rename it from model.py to model_add.py (or add.py ) ?

Thanks for the help!

@Juanfi8 Juanfi8 requested a review from digantdesai as a code owner May 14, 2025 11:45
@zingo zingo added the release notes: arm Changes to the ARM backend delegate label May 14, 2025
@zingo
Copy link
Collaborator

zingo commented May 14, 2025

Thanks for the update!

@zingo
Copy link
Collaborator

zingo commented May 14, 2025

All the llama test errors are unrelated and seen in other PRs right now.

@zingo
Copy link
Collaborator

zingo commented May 14, 2025

@Juanfi8 Almost ready to merge :)
There is just a smal lintrunner error see:
https://github.com/pytorch/executorch/actions/runs/15019836027/job/42206414796?pr=10810

lintrunner --force-color --all-files --tee-json=lint.json

Lint for examples/arm/example_modules/add.py:

Warning (UFMT) format
Run lintrunner -a to apply this patch.

You can run `lintrunner -a` to apply this patch.

 1   1 | import torch
 2   2 | 
     3 |+
 3   4 | class myModelAdd(torch.nn.Module):
 4   5 |     def __init__(self):
 5   6 |         super().__init__()

 7   8 |     def forward(self, x):
 8   9 |         return x + x
 9  10 | 
 9     |-ModelUnderTest=myModelAdd()
    11 |+
    12 |+ModelUnderTest = myModelAdd()
11  13 | ModelInputs = (torch.ones(5),)

@Juanfi8
Copy link
Contributor Author

Juanfi8 commented May 14, 2025

I hope this time is the one :)
Happy to contribute to the project.

@zingo zingo merged commit 101746e into pytorch:main May 14, 2025
80 of 92 checks passed
@zingo
Copy link
Collaborator

zingo commented May 14, 2025

Great work!

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. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants