Skip to content

Conversation

@tgonzalezorlandoarm
Copy link
Contributor

@tgonzalezorlandoarm tgonzalezorlandoarm commented Dec 17, 2025

Summary

Modify examples/arm/run.sh and examples/arm/visualize.py to be able to trigger visualization (pte or tosa) of the model.
For the Ethos-U delegate, we need to pass down intermediate .tosa artifacts. Invoke the PTE adapter API to do that.

Test plan

I tested with

  1. ./examples/arm/run.sh --model_name=mv2 --model_explorer --visualize_pte
  2. ./examples/arm/run.sh --model_name=mv2 --target="vgf" --model_explorer --visualize_pte
  3. ./examples/arm/run.sh --model_name=mv2 --model_explorer --visualize_tosa

cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai

For the Ethos-U delegate, we need to handle intermediate .tosa
artifacts. Invoke the PTE adapter API to do that.

Signed-off-by: Tomás González <[email protected]>
Copilot AI review requested due to automatic review settings December 17, 2025 10:24
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 17, 2025

🔗 Helpful Links

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

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

❌ 3 New Failures, 7 Unrelated Failures

As of commit 4de16b3 with merge base db895e9 (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

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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 Dec 17, 2025
Copy link
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

This PR adds visualization support for PTE (PyTorch Export) files in Model Explorer for the Arm backend, complementing the existing TOSA visualization capability. Users can now choose between visualizing TOSA flatbuffer models or PTE models with their delegates through new command-line flags.

Key changes:

  • Modified run.sh to add --visualize_pte and --visualize_tosa flags for choosing visualization format
  • Updated visualize.py to handle both PTE and TOSA visualization modes with appropriate adapter logic
  • Added pte-adapter-model-explorer dependency for PTE visualization support

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
examples/arm/visualize.py Refactored to support both PTE and TOSA visualization modes with new configuration functions and command-line argument handling
examples/arm/run.sh Added flags for selecting visualization format (PTE or TOSA) and updated help text and logic accordingly
backends/arm/requirements-arm-ethos-u.txt Added pte-adapter-model-explorer dependency for PTE visualization

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

@tgonzalezorlandoarm
Copy link
Contributor Author

@pytorchbot label ciflow/trunk

@pytorch-bot
Copy link

pytorch-bot bot commented Dec 17, 2025

To add these label(s) (ciflow/trunk) to the PR, 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.

@tgonzalezorlandoarm
Copy link
Contributor Author

@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 Dec 17, 2025
@tgonzalezorlandoarm
Copy link
Contributor Author

@pytorchbot label "release notes: arm"

@pytorch-bot pytorch-bot bot added the release notes: arm Changes to the ARM backend delegate label Dec 17, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 17, 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.

Signed-off-by: Tomás González <[email protected]>
Change-Id: Ic3e49022bbade1aa74590c06eeb0a06f8cef6199
Copilot AI review requested due to automatic review settings December 18, 2025 14:06
Copy link
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

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


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

@zingo
Copy link
Collaborator

zingo commented Dec 18, 2025

Known unrelated Arm fails
FAILED backends/arm/test/models/test_T5ForConditionalGeneration_arm.py::test_T5ForConditionalGeneration_tosa_FP
FAILED backends/arm/test/models/test_T5ForConditionalGeneration_arm.py::test_T5ForConditionalGeneration_tosa_INT

Waiting on one more Arm test (and all other tests to finish)

@zingo
Copy link
Collaborator

zingo commented Dec 18, 2025

Oter fails are also unrelated

@zingo zingo merged commit 7eb43bb into pytorch:main Dec 18, 2025
292 of 303 checks passed
@tgonzalezorlandoarm tgonzalezorlandoarm deleted the pte-visualization-model-explorer branch December 19, 2025 09:32
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. 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.

3 participants