KEMBAR78
automatic_dynamic_shapes_mark_as by ezyang · Pull Request #141415 · pytorch/pytorch · GitHub
Skip to content

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Nov 23, 2024

Stack from ghstack (oldest at bottom):

This adds an option to cause automatic dynamic shapes to trigger
unbacked SymInts rather than backed SymInts. This can potentially
help if you are still seeing recompilations from 0/1 specialization
but it also might just cause your program to fail with
GuardOnDataDependent errors.

Signed-off-by: Edward Z. Yang ezyang@meta.com

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

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Nov 23, 2024
This adds an option to cause automatic dynamic shapes to trigger
unbacked SymInts rather than backed SymInts.  This can potentially
help if you are still seeing recompilations from 0/1 specialization
but it also might just cause your program to fail with
GuardOnDataDependent errors.

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: a3ca847
Pull Request resolved: #141415
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 23, 2024

🔗 Helpful Links

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

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 7df218a with merge base dd2d0c6 (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.

@ezyang ezyang added topic: new features topic category release notes: dynamo ciflow/trunk Trigger trunk jobs on your pull request labels Nov 23, 2024
@bobrenjc93
Copy link
Contributor

Can you elaborate on the tradeoffs between this and the more explicit path of having a flag like disable_0_1_specialization?

@ezyang
Copy link
Contributor Author

ezyang commented Nov 24, 2024

Can you elaborate on the tradeoffs between this and the more explicit path of having a flag like disable_0_1_specialization?

I'm not sure exactly what you're proposing with disable_0_1_specialization. If you're asking specifically about whether or not to do the config as a str or a bool, there would be a third variant if #137100 was implemented, which is why I don't want a bool.

[ghstack-poisoned]
@ezyang ezyang changed the title [POC] automatic_dynamic_shapes_mark_as automatic_dynamic_shapes_mark_as Dec 11, 2024
[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Dec 11, 2024
Fixes #137100

Should also add a mark_oblivious API for manual control.

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: #141444
Approved by: https://github.com/bobrenjc93
ghstack dependencies: #141415
@github-actions github-actions bot deleted the gh/ezyang/3009/head branch January 11, 2025 02:11
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.

3 participants