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

Prevent pattern matches across mutation ops in inductor pre-grad FX passes #101144

Closed
wants to merge 3 commits into from

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented May 11, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 4a5b76f:
💚 Looks good so far! There are no failures yet. 💚

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

williamwen42 added a commit that referenced this pull request May 11, 2023
…asses

ghstack-source-id: 0a6dc2ee0cfb242e13ee46192b758134f332c476
Pull Request resolved: #101144
@williamwen42 williamwen42 changed the title prevent pattern matches across mutation ops in inductor pre-grad FX passes Prevent pattern matches across mutation ops in inductor pre-grad FX passes May 11, 2023
@williamwen42 williamwen42 added release notes: inductor ciflow/trunk Trigger trunk jobs on your pull request labels May 11, 2023
@williamwen42 williamwen42 changed the title Prevent pattern matches across mutation ops in inductor pre-grad FX passes [WIP] Prevent pattern matches across mutation ops in inductor pre-grad FX passes May 11, 2023
@williamwen42 williamwen42 requested a review from jansel May 11, 2023 01:08
torch/_inductor/pattern_matcher.py Outdated Show resolved Hide resolved
@williamwen42
Copy link
Member Author

Running pytest test/inductor now takes significantly longer. Runtime increased to 10788.64s from 1691.55s.

@jansel
Copy link
Contributor

jansel commented May 12, 2023

Running pytest test/inductor now takes significantly longer. Runtime increased to 10788.64s from 1691.55s.

That is weird. You could disable this for joint_graph and post_grad, and only turn it on for the pre-grad graph.

@williamwen42
Copy link
Member Author

Is there an existing method to do this, or do I just add the mutation check directly to the existing passes in pre_grad.py?

@jansel
Copy link
Contributor

jansel commented May 17, 2023

Is there an existing method to do this, or do I just add the mutation check directly to the existing passes in pre_grad.py?

You would need to add a flag (or a mode).

…tor pre-grad FX passes"


Per #101124

cc soumith voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request May 18, 2023
…asses

ghstack-source-id: 89b9ae69399b94c1fe6997d69b74ca1ac77a0977
Pull Request resolved: #101144
…tor pre-grad FX passes"


Per #101124

cc soumith voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request May 18, 2023
…asses

ghstack-source-id: fa14b4dbba1739326ba0502f438c93632ab00d00
Pull Request resolved: #101144
@williamwen42 williamwen42 changed the title [WIP] Prevent pattern matches across mutation ops in inductor pre-grad FX passes Prevent pattern matches across mutation ops in inductor pre-grad FX passes May 18, 2023
@williamwen42
Copy link
Member Author

Inductor unittests don't seem to be taking substantially longer anymore.

@williamwen42 williamwen42 requested a review from jansel May 19, 2023 19:26
@williamwen42
Copy link
Member Author

@pytorchbot merge

@pytorchmergebot
Copy link
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

@facebook-github-bot facebook-github-bot deleted the gh/williamwen42/55/head branch June 8, 2023 19:22
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.

None yet

3 participants