Skip to content

Add pass to convert split to many slice #4562

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

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

Erik-Lundell
Copy link
Collaborator

Change-Id: I15f8a37fe88ba6c7d1e357c9ab897069c3c912b2

Copy link

pytorch-bot bot commented Aug 6, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 79312e0 with merge base 6cb5726 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@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 Aug 6, 2024
@Erik-Lundell Erik-Lundell added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label Aug 6, 2024
from torch.fx.passes.utils.source_matcher_utils import get_source_partitions


class ConvertSplitToSlicePass(ExportPass):
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, like it how simple you made it. :)

class TestSimpleSplit(unittest.TestCase):
class Split(torch.nn.Module):

test_data: list[tuple[test_data_t]] = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Love this.

@facebook-github-bot
Copy link
Contributor

@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@digantdesai
Copy link
Contributor

Seems like I messed up the merge conflict resolution. Let me fix the missing ).

@digantdesai
Copy link
Contributor

Actually can you please rebase (force) since there are more conflicts. Thanks.

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

Actually can you please rebase (force) since there are more conflicts. Thanks.

Done :)

This is a better way to find all aten split nodes,
since get_source_partion misses split nodes added
during lowering.

Signed-off-by: Erik Lundell <[email protected]>
Change-Id: Iff850850341240d22e1012511de23b3efdabf1bb
@facebook-github-bot
Copy link
Contributor

@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot merged commit eaf383a into pytorch:main Aug 19, 2024
37 checks passed
@Erik-Lundell Erik-Lundell deleted the split_pass branch September 4, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants