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

different bounds for same Dim name #110638

Closed

Conversation

avikchaudhuri
Copy link
Contributor

@avikchaudhuri avikchaudhuri commented Oct 5, 2023

Stack from ghstack (oldest at bottom):

Previously,Dim definitions that shared the same name but had different ranges were allowed to appear in the dynamic_shapes argument of an export call. They would correspond to the same dynamic dimension (identified by the shared name) with an effective range would be the intersection of the different ranges.

However this behavior can be confusing, because having different definitions with the same name is more likely than not unintentional. Therefore, this PR makes it a user error.

We still allow different definitions with the same name to exist at the same time (no global uniqueness) as long as they are not confused in the same export call. Redefinitions with the same bounds are also allowed, in case they are accidentally created by executing the same code multiple times.

Differential Revision: D49965944

cc @gmagogsfm @zhxchen17 @tugsbayasgalan

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 5, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit d511172 with merge base 11b3210 (image):

UNSTABLE - The following jobs failed but were 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.

avikchaudhuri added a commit that referenced this pull request Oct 5, 2023
Differential Revision: [D49965944](https://our.internmc.facebook.com/intern/diff/D49965944/)

ghstack-source-id: 203066884
Pull Request resolved: #110638
@avikchaudhuri avikchaudhuri added the release notes: fx release notes category label Oct 5, 2023
Previously,`Dim` definitions that shared the same name but had different ranges were allowed to appear in the `dynamic_shapes` argument of an `export` call. They would correspond to the *same* dynamic dimension (identified by the shared name) with an effective range would be the *intersection* of the different ranges.

However this behavior can be confusing, because having different definitions with the same name is more likely than not  unintentional. Therefore, this PR makes it a user error.

We still allow different definitions with the same name to exist at the same time (no global uniqueness) as long as they are not confused in the same `export` call. Redefinitions with the same bounds are also allowed, in case they are accidentally created by executing the same code multiple times.

Differential Revision: [D49965944](https://our.internmc.facebook.com/intern/diff/D49965944/)

cc gmagogsfm

[ghstack-poisoned]
avikchaudhuri added a commit that referenced this pull request Oct 5, 2023
Pull Request resolved: #110638


ghstack-source-id: 203103684
@exported-using-ghexport

Differential Revision: [D49965944](https://our.internmc.facebook.com/intern/diff/D49965944/)
Previously,`Dim` definitions that shared the same name but had different ranges were allowed to appear in the `dynamic_shapes` argument of an `export` call. They would correspond to the *same* dynamic dimension (identified by the shared name) with an effective range would be the *intersection* of the different ranges.

However this behavior can be confusing, because having different definitions with the same name is more likely than not  unintentional. Therefore, this PR makes it a user error.

We still allow different definitions with the same name to exist at the same time (no global uniqueness) as long as they are not confused in the same `export` call. Redefinitions with the same bounds are also allowed, in case they are accidentally created by executing the same code multiple times.

Differential Revision: [D49965944](https://our.internmc.facebook.com/intern/diff/D49965944/)

cc gmagogsfm

[ghstack-poisoned]
avikchaudhuri added a commit that referenced this pull request Oct 6, 2023
Pull Request resolved: #110638


ghstack-source-id: 203117236
@exported-using-ghexport

Differential Revision: [D49965944](https://our.internmc.facebook.com/intern/diff/D49965944/)
Previously,`Dim` definitions that shared the same name but had different ranges were allowed to appear in the `dynamic_shapes` argument of an `export` call. They would correspond to the *same* dynamic dimension (identified by the shared name) with an effective range would be the *intersection* of the different ranges.

However this behavior can be confusing, because having different definitions with the same name is more likely than not  unintentional. Therefore, this PR makes it a user error.

We still allow different definitions with the same name to exist at the same time (no global uniqueness) as long as they are not confused in the same `export` call. Redefinitions with the same bounds are also allowed, in case they are accidentally created by executing the same code multiple times.

Differential Revision: [D49965944](https://our.internmc.facebook.com/intern/diff/D49965944/)

cc gmagogsfm

[ghstack-poisoned]
avikchaudhuri added a commit that referenced this pull request Oct 6, 2023
Pull Request resolved: #110638


ghstack-source-id: 203199273
@exported-using-ghexport

Differential Revision: [D49965944](https://our.internmc.facebook.com/intern/diff/D49965944/)
@avikchaudhuri
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 6, 2023
@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 Merged release notes: fx release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants