-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Move ShapeEnv config out of dynamo #112933
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/112933
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 57f652d with merge base fa9045a (): FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Nov 4, 2023
Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. [ghstack-poisoned]
Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler [ghstack-poisoned]
Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler [ghstack-poisoned]
peterbell10
added a commit
to peterbell10/pytorch
that referenced
this pull request
Nov 6, 2023
Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. ghstack-source-id: 5f7350b61035afa8f10d1db095756e48913a2418 Pull Request resolved: pytorch#112933
Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler [ghstack-poisoned]
ezyang
approved these changes
Nov 6, 2023
pytorchmergebot
pushed a commit
that referenced
this pull request
Nov 7, 2023
This may seem a bit silly but we spend ~5% of compilation on simply checking if the `ShapeEnv` cache has been invalidated. It isn't necessarily slow, but we call it millions of times per compile so everything adds up. To improve the situation, I've added a version counter to the shape env that gets incremented whenever the cache key changes. This does require a bit of care in `ShapeEnv` that we don't modify the relevant state without calling `self._update_version_counter()`. However, we already have a similar situation for the translation validation feature which requires `_set_replacement` to be called instead of modifying the replacements directly. Pull Request resolved: #112687 Approved by: https://github.com/ezyang ghstack dependencies: #112933
xuhancn
pushed a commit
to xuhancn/pytorch
that referenced
this pull request
Nov 7, 2023
Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. Pull Request resolved: pytorch#112933 Approved by: https://github.com/ezyang
xuhancn
pushed a commit
to xuhancn/pytorch
that referenced
this pull request
Nov 7, 2023
This may seem a bit silly but we spend ~5% of compilation on simply checking if the `ShapeEnv` cache has been invalidated. It isn't necessarily slow, but we call it millions of times per compile so everything adds up. To improve the situation, I've added a version counter to the shape env that gets incremented whenever the cache key changes. This does require a bit of care in `ShapeEnv` that we don't modify the relevant state without calling `self._update_version_counter()`. However, we already have a similar situation for the translation validation feature which requires `_set_replacement` to be called instead of modifying the replacements directly. Pull Request resolved: pytorch#112687 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#112933
facebook-github-bot
pushed a commit
to pytorch/benchmark
that referenced
this pull request
Nov 7, 2023
Summary: Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. X-link: pytorch/pytorch#112933 Approved by: https://github.com/ezyang Reviewed By: PaliC Differential Revision: D51057187 fbshipit-source-id: fc38e8f8c81d2ea0dc499859acdd1fd15688a19f
Skylion007
pushed a commit
to Skylion007/pytorch
that referenced
this pull request
Nov 14, 2023
Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. Pull Request resolved: pytorch#112933 Approved by: https://github.com/ezyang
Skylion007
pushed a commit
to Skylion007/pytorch
that referenced
this pull request
Nov 14, 2023
This may seem a bit silly but we spend ~5% of compilation on simply checking if the `ShapeEnv` cache has been invalidated. It isn't necessarily slow, but we call it millions of times per compile so everything adds up. To improve the situation, I've added a version counter to the shape env that gets incremented whenever the cache key changes. This does require a bit of care in `ShapeEnv` that we don't modify the relevant state without calling `self._update_version_counter()`. However, we already have a similar situation for the translation validation feature which requires `_set_replacement` to be called instead of modifying the replacements directly. Pull Request resolved: pytorch#112687 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#112933
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ciflow/inductor
Merged
module: dynamo
module: inductor
open source
release notes: fx
release notes category
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Previously there was a circular dependency between fx and dynamo that happened
to work out since ShapeEnv didn't access the config at module init time.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler