Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm backend: Add WhyNoPartitionReporter and report rejected nodes #8963

Merged
merged 2 commits into from
Mar 20, 2025

Conversation

Erik-Lundell
Copy link
Collaborator

@Erik-Lundell Erik-Lundell commented Mar 5, 2025

With more complex checks for if nodes are supported or not, it can probably be complicated for a user to understand why a ceratin node was rejected from partitioning.
The WhyNoPartitionReporter attempts to mitigate this by producing a table with all rejected nodes with a reason for why they were rejected.

The reasoning behind using a class rather than log statements is

  • The table keeps all reject information in the same place.
  • Uniform formatting.
  • Only log the first reject report of a node.
  • Easier to change how and when the output is logged/dumped to file.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218

@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 Mar 5, 2025
Copy link

pytorch-bot bot commented Mar 5, 2025

🔗 Helpful Links

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

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

❌ 1 Cancelled Job, 1 Pending

As of commit 802d148 with merge base 5cd973c (image):

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

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

@Erik-Lundell Erik-Lundell added ciflow/trunk partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm topic: not user facing labels Mar 5, 2025
Copy link
Contributor

@mcr229 mcr229 left a comment

Choose a reason for hiding this comment

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

In general this looks good to me, and is what i'm hoping our partitioner logging infra can look like moving forward.

Would love to see placeholder tensors reported in the future, but that can be added later i suppose.

With more complex checks for if nodes are supported or not,
it can probably be complicated for a user to understand why
a ceratin node was rejected from partitioning.
The WhyNoPartitionReporter attempts to mitigate this by producing
a table with all rejected nodes with a reason for why
they were rejected.

The reasoning behind using a class rather than log statements
is
- The table keeps all reject information in the same place.
- Uniform formatting.
- Only log the first reject report of a node.
- Easier to change how and when the output is logged/dumped to file.

Signed-off-by: Erik Lundell <[email protected]>
Change-Id: I3765a0db4bfe530b34a7c5d48b04faa5d08e51de
@zingo
Copy link
Collaborator

zingo commented Mar 20, 2025

MacOs fails unrelatred

@zingo zingo merged commit 8b8bd23 into pytorch:main Mar 20, 2025
161 of 163 checks passed
oscarandersson8218 pushed a commit to oscarandersson8218/executorch that referenced this pull request Mar 21, 2025
…torch#8963)

With more complex checks for if nodes are supported or not, it can
probably be complicated for a user to understand why a ceratin node was
rejected from partitioning.
The WhyNoPartitionReporter attempts to mitigate this by producing a
table with all rejected nodes with a reason for why they were rejected.

The reasoning behind using a class rather than log statements is
- The table keeps all reject information in the same place.
- Uniform formatting.
- Only log the first reject report of a node.
- Easier to change how and when the output is logged/dumped to file.

Signed-off-by: Erik Lundell <[email protected]>
DannyYuyang-quic pushed a commit to CodeLinaro/executorch that referenced this pull request Apr 2, 2025
…torch#8963)

With more complex checks for if nodes are supported or not, it can
probably be complicated for a user to understand why a ceratin node was
rejected from partitioning.
The WhyNoPartitionReporter attempts to mitigate this by producing a
table with all rejected nodes with a reason for why they were rejected.

The reasoning behind using a class rather than log statements is
- The table keeps all reject information in the same place.
- Uniform formatting.
- Only log the first reject report of a node.
- Easier to change how and when the output is logged/dumped to file.

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 topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants