8000 Shard RegisterDispatchKey by swolchok · Pull Request #144364 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
wants to merge 8 commits into from
Closed

Conversation

swolchok
Copy link
Contributor
@swolchok swolchok commented Jan 8, 2025

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

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]
Copy link
pytorch-bot bot commented Jan 8, 2025

🔗 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 (image):

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.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67925496

swolchok added a commit that referenced this pull request Jan 8, 2025
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
@swolchok swolchok added the release notes: build release notes category label Jan 8, 2025
@swolchok
Copy link
Contributor Author
swolchok commented Jan 8, 2025

whoops, pushed 7df69db to the wrong PR (it goes in the bottom-of-stack PR), will fix shortly

@swolchok
Copy link
Contributor Author
swolchok commented Jan 8, 2025

@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]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67925496

swolchok added a commit that referenced this pull request Jan 8, 2025
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]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67925496

@swolchok swolchok requested review from Skylion007 and bdhirsh January 8, 2025 23:30
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]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67925496

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 9, 2025
":{}[{}]".format(aten_rule_name, "Register" + backend + ".cpp")
for backend in enabled_backends
]
":{}[{}]".format(aten_rule_name, "Register" + backend + "_0.cpp")
Copy link
Collaborator

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

Copy link
Contributor Author

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

8000
def write_sharded_with_template(
self,
filename: str,
template_fn: str,
Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor Author
@swolchok swolchok Jan 9, 2025

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 :\

Copy link
Contributor
@bdhirsh bdhirsh left a 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]
swolchok added a commit that referenced this pull request Jan 9, 2025
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/)
@facebook-github-bot
67E6 Copy link
Contributor

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]
@facebook-github-bot
Copy link
Contributor

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]
swolchok added a commit that referenced this pull request Jan 9, 2025
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/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67925496

@swolchok
Copy link
Contributor Author
swolchok commented Jan 9, 2025

linux-jammy-py3-clang12-executorch job failed but is unstable and failing on main , so I'm ignoring the failure

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: build release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0