Skip to content

Arm backend: Initial support of conditional operator - #15549

Merged
zingo merged 3 commits into
pytorch:mainfrom
Erik-Lundell:initial_cond
Nov 7, 2025
Merged

zingo merged 3 commits into
pytorch:mainfrom
Erik-Lundell:initial_cond

Conversation

@Erik-Lundell

@Erik-Lundell Erik-Lundell commented Nov 4, 2025 •

Copy link
Copy Markdown
Collaborator
- Add partition check to make sure that the submodules with
the if/else codepaths are fully delegated.
- Fix some partitioning issues with submodule nodes, since they
point to a submodule rather than a tensor they dont have a fake tensor.
- Add node visitor.
- Add tests.

Arm backend: Use output.name in node visitors

As mentioned in #15381, TOSA tensors need unique naming,
which gets tricky with submodules. It is handled in
the TosaArg object, and therefore node visitors need
to use output.name rather than node.name when creating
new tensors.

cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai

As mentioned in pytorch#15381, TOSA tensors need unique naming,
which gets tricky with submodules. It is handled in
the TosaArg object, and therefore node visitors need
to use output.name rather than node.name when creating
new tensors.

Signed-off-by: Erik Lundell <[email protected]>
Change-Id: I7a943deda0888c1de8796dd573e8befda3f074b2
- Add partition check to make sure that the submodules with
the if/else codepaths are fully delegated.
- Fix some partitioning issues with submodule nodes, since they
point to a submodule rather than a tensor they dont have a fake tensor.
- Add node visitor.
- Add tests.

Signed-off-by: Erik Lundell <[email protected]>
Change-Id: I00dbfdedb04c686ce04b4fb1d682816038b7e1bf
@pytorch-bot

pytorch-bot Bot commented Nov 4, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (7 Unrelated Failures)

As of commit 7198aa0 with merge base 4ea9ddf (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs 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 Nov 4, 2025
@Erik-Lundell Erik-Lundell added ciflow/trunk partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes labels Nov 4, 2025
@zingo

zingo commented Nov 4, 2025

Copy link
Copy Markdown
Collaborator

Hi again @SS-JIA here is a lager patch touching many file. Sorry we got so many in a row right now, it's usually calmer :)

@Erik-Lundell Erik-Lundell added release notes: arm Changes to the ARM backend delegate and removed release notes: none Do not include this in the release notes labels Nov 5, 2025
@zingo

zingo commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

@SS-JIA we think this should be buck2 build safe as the new cond op should be handled by the
srcs = glob(["op_.py", "ops_.py"]), rule.

@SS-JIA SS-JIA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be okay!

@zingo

zingo commented Nov 7, 2025

Copy link
Copy Markdown
Collaborator

Failed tests seems unrelated

@zingo
zingo merged commit 5a55382 into pytorch:main Nov 7, 2025
jirioc pushed a commit to nxp-upstream/executorch that referenced this pull request Dec 19, 2025
- Add partition check to make sure that the submodules with
    the if/else codepaths are fully delegated.
    - Fix some partitioning issues with submodule nodes, since they
point to a submodule rather than a tensor they dont have a fake tensor.
    - Add node visitor.
    - Add tests.
    
Arm backend: Use output.name in node visitors
    
    As mentioned in pytorch#15381, TOSA tensors need unique naming,
    which gets tricky with submodules. It is handled in
    the TosaArg object, and therefore node visitors need
    to use output.name rather than node.name when creating
    new tensors.



cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai

---------

Signed-off-by: Erik Lundell <[email protected]>
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