Skip to content

[inductor] Fix pattern replacements with multiple users - #129689

Closed
peterbell10 wants to merge 1 commit into
gh/peterbell10/756/basefrom
gh/peterbell10/756/head
Closed

peterbell10 wants to merge 1 commit into
gh/peterbell10/756/basefrom
gh/peterbell10/756/head

Conversation

@peterbell10

@peterbell10 peterbell10 commented Jun 27, 2024 •

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

Fixes #129685

After matching a pattern, we currently try to remove all the nodes of that
pattern, which doesn't work if any intermediate node has users outside of the
pattern. In which case we can't delete those particular nodes.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jun 27, 2024 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit 406e6cb with merge base 5ee893a (image):

UNSTABLE - The following jobs failed but were likely due to flakiness present on trunk and has been marked as unstable:

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

peterbell10 added a commit that referenced this pull request Jun 27, 2024
Fixes #129685

After matching a pattern, we currently try to remove all the nodes of that
pattern which doesn't work if an intermediate node has users outside of the
pattern. In this case we can't delete those particular nodes.

ghstack-source-id: 0f3dfb9
Pull Request resolved: #129689
@peterbell10 peterbell10 changed the title [inductor] Fix patterns replacements with multiple users [inductor] Fix pattern replacements with multiple users Jun 27, 2024
@peterbell10
peterbell10 requested a review from shunting314 June 27, 2024 19:17
@peterbell10 peterbell10 added the topic: not user facing topic category label Jun 27, 2024
@peterbell10

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 27, 2024
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@Chillee

Chillee commented Jun 28, 2024

Copy link
Copy Markdown
Collaborator

I don't understand this actually. How can we match the pattern if there are any users of intermediates nodes elsewhere in the graph? I thought that if we wanted to match that we needed to explicitly return those intermediate nodes elsewhere?

cc: @jansel

@peterbell10

Copy link
Copy Markdown
Collaborator Author

How can we match the pattern if there are any users of intermediates nodes elsewhere in the graph?

You can define the pattern with users=MULTIPLE

@github-actions
github-actions Bot deleted the gh/peterbell10/756/head branch July 29, 2024 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants