Skip to content

Arm backend: Move import in DecomposePermuteForU55Pass#19331

Open
AdrianLundell wants to merge 1 commit intopytorch:mainfrom
AdrianLundell:change-1255702
Open

Arm backend: Move import in DecomposePermuteForU55Pass#19331
AdrianLundell wants to merge 1 commit intopytorch:mainfrom
AdrianLundell:change-1255702

Conversation

@AdrianLundell
Copy link
Copy Markdown
Collaborator

@AdrianLundell AdrianLundell commented May 6, 2026

Importing on top-level causes a dependency cycle

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

Importing on top-level causes a dependency cycle

Signed-off-by: Adrian Lundell <adrian.lundell@arm.com>
Change-Id: I166af41c1019b9a5590e69706bdb4ed2c2fb6988
Copilot AI review requested due to automatic review settings May 6, 2026 13:11
@AdrianLundell AdrianLundell requested a review from digantdesai as a code owner May 6, 2026 13:11
@AdrianLundell AdrianLundell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: none Do not include this in the release notes labels May 6, 2026
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 6, 2026

🔗 Helpful Links

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

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

❌ 1 Awaiting Approval, 1 New Failure, 1 Cancelled Job, 11 Unrelated Failures

As of commit 86fef38 with merge base 1debeb6 (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

NEW FAILURE - The following job has failed:

CANCELLED JOB - The following job was cancelled. Please retry:

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.

@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 May 6, 2026
@github-actions github-actions Bot added the module: arm Issues related to arm backend label May 6, 2026
Copy link
Copy Markdown
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 adjusts the Arm backend’s DecomposePermuteForU55Pass to avoid a circular dependency by moving the EthosUCompileSpec import from module scope into the specific helper method that uses it.

Changes:

  • Removed the top-level import of EthosUCompileSpec.
  • Added a lazy (function-local) import of EthosUCompileSpec inside _violates_exact_constraint() to break the dependency cycle.

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

Comment on lines +114 to 119
# Lazy import to avoid circular dependency
from executorch.backends.arm.ethosu.compile_spec import EthosUCompileSpec

if dtype not in (torch.int8, torch.bool, torch.int16):
return True

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants