-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Shard RegisterDispatchKey #144364
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
Shard RegisterDispatchKey #144364
Conversation
Should fix #143952 . Testing: build PyTorch on Raspberry Pi 5 to demonstrate this fixes high peak memory requirement (TODO). Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/144364
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 40388ae with merge base bc57635 ( UNSTABLE - The following job failed but was 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. |
This pull request was exported from Phabricator. Differential Revision: D67925496 |
Should fix #143952 . Testing: build PyTorch on Raspberry Pi 5 to demonstrate this fixes high peak memory requirement (TODO). Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) ghstack-source-id: 260579275 Pull Request resolved: #144364
whoops, pushed 7df69db to the wrong PR (it goes in the bottom-of-stack PR), will fix shortly |
@swolchok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Should fix #143952 . Testing: build PyTorch on Raspberry Pi 5 to demonstrate this fixes high peak memory requirement (TODO). Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D67925496 |
Pull Request resolved: #144364 Should fix #143952 . Testing: build PyTorch on Raspberry Pi 5 to demonstrate this fixes high peak memory requirement (TODO). Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) ghstack-source-id: 260637494
Should fix #143952 . Testing: build PyTorch on Raspberry Pi 5 to demonstrate this fixes high peak memory requirement (TODO). Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D67925496 |
Should fix #143952 . Testing: built PyTorch on Raspberry Pi 5; this seemed to alleviate high peak memory requirement. (I did increase shard counts for other generated files along the way, but I need to go back and figure out how much of that was strictly necessary vs. needing to use -j1 or -j2.) Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D67925496 |
":{}[{}]".format(aten_rule_name, "Register" + backend + ".cpp") | ||
for backend in enabled_backends | ||
] | ||
":{}[{}]".format(aten_rule_name, "Register" + backend + "_0.cpp") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While adjusting this, f-string might be a bit cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starlark doesn't have f-strings -- bazelbuild/starlark#91
def write_sharded_with_template( | ||
self, | ||
filename: str, | ||
template_fn: str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: template_fn
-> template_name
? (it looks like this is the string name of the input template file, not a function)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this matches the existing template_fn
parameter to write_with_template
and substitute_with_template
. I agree that it is confusing to overload "fn" to abbreviate both "filename" and "function", and there is a lot of historical precedent for "function", so I will just do a file-wide find-replace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file-wide find-replace
BC-Lint has informed me that I can't do that, so I will keep it template_fn for consistency :\
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm!
Should fix #143952 . Testing: built PyTorch on Raspberry Pi 5; this seemed to alleviate high peak memory requirement. (I did increase shard counts for other generated files along the way, but I need to go back and figure out how much of that was strictly necessary vs. needing to use -j1 or -j2.) Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) [ghstack-poisoned]
Pull Request resolved: #144364 Should fix #143952 . Testing: build PyTorch on Raspberry Pi 5 to demonstrate this fixes high peak memory requirement (TODO). ghstack-source-id: 260776837 Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/)
This pull request was exported from Phabricator. Differential Revision: D67925496 |
Should fix #143952 . Testing: built PyTorch on Raspberry Pi 5; this seemed to alleviate high peak memory requirement. (I did increase shard counts for other generated files along the way, but I need to go back and figure out how much of that was strictly necessary vs. needing to use -j1 or -j2.) Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D67925496 |
Should fix #143952 . Testing: built PyTorch on Raspberry Pi 5; this seemed to alleviate high peak memory requirement. (I did increase shard counts for other generated files along the way, but I need to go back and figure out how much of that was strictly necessary vs. needing to use -j1 or -j2.) Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/) [ghstack-poisoned]
Pull Request resolved: #144364 Should fix #143952 . Testing: build PyTorch on Raspberry Pi 5 to demonstrate this fixes high peak memory requirement (TODO). ghstack-source-id: 260820041 Differential Revision: [D67925496](https://our.internmc.facebook.com/intern/diff/D67925496/)
This pull request was exported from Phabricator. Differential Revision: D67925496 |
linux-jammy-py3-clang12-executorch job failed but is unstable and failing on main , so I'm ignoring the failure |
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour 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 |
introduced by #144364. [ghstack-poisoned]
Stack from ghstack (oldest at bottom):
Should fix #143952 .
Testing: built PyTorch on Raspberry Pi 5; this seemed to alleviate high peak memory requirement. (I did increase shard counts for other generated files along the way, but I need to go back and figure out how much of that was strictly necessary vs. needing to use -j1 or -j2.)
Differential Revision: D67925496