Skip to content

[codex] Preserve Arm partition tag order#19060

Draft
Praneeth1636 wants to merge 1 commit intopytorch:mainfrom
Praneeth1636:codex/fix-arm-partitioner-tag-order
Draft

[codex] Preserve Arm partition tag order#19060
Praneeth1636 wants to merge 1 commit intopytorch:mainfrom
Praneeth1636:codex/fix-arm-partitioner-tag-order

Conversation

@Praneeth1636
Copy link
Copy Markdown

@Praneeth1636 Praneeth1636 commented Apr 23, 2026

Summary

  • preserve Arm partition discovery order in TOSAPartitioner instead of materializing tags through an unordered set
  • keep partition() emitting partition_tags in that stable discovery order
  • add focused regression tests for tag ordering in the Arm partitioner

Why

  • fixes nondeterministic Arm export/lowering order when Python hash randomization changes set iteration order
  • keeps backend artifacts stable across fresh processes for the same model and weights

Fixes #19045

Testing

  • PYTHONPATH=/tmp/executorch-test-stubs:src .venv/bin/python -m pytest --config-file=/dev/null backends/arm/test/misc/test_partitioner_tag_order.py

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 23, 2026

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 10 Awaiting Approval, 11 New Failures, 22 Pending, 1 Unrelated Failure

As of commit f2e5c7c with merge base c48ea12 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

NEW FAILURES - The following jobs have failed:

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

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

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 23, 2026

Hi @Praneeth1636!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Apr 23, 2026
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 23, 2026

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@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.

@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 23, 2026
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 23, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@perheld perheld self-requested a review April 23, 2026 08:59
@@ -0,0 +1,80 @@
# Copyright 2026 Arm Limited and/or its affiliates.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I dont think this is needed here if you are not a Arm employee. Once/if we touch the file we will add the copyright.

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. module: arm Issues related to arm backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arm backend bug: TOSAPartitioner.partition() makes export order depend on Python hash randomization

2 participants