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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ban or change behavior of TensorVariable.size #120568

Open
ezyang opened this issue Feb 24, 2024 · 4 comments
Open

Ban or change behavior of TensorVariable.size #120568

ezyang opened this issue Feb 24, 2024 · 4 comments
Labels
dynamo-must-fix These bugs affect TorchDynamo reliability. module: dynamic shapes module: dynamo oncall: pt2 small We think this is a small issue to fix. Consider knocking off high priority small issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@ezyang
Copy link
Contributor

ezyang commented Feb 24, 2024

馃悰 Describe the bug

Recent bug #120482 was due to someone directly accessing TensorVariable.size; fixed in #120567. But this field is None when the tensor has dynamic shapes. This is a dynamic shapes footgun. Either ban this, or change this to query size off of the fake tensor (and be willing to return SymInts).

Versions

main

cc @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @aakhundov

@ezyang
Copy link
Contributor Author

ezyang commented Feb 24, 2024

cc @yanboliang @eellison who were involved in #108182 which introduced the bug in this particular case

@Skylion007
Copy link
Collaborator

@ezyang Sounds like the fix would be a good backport candidate too?

@ezyang
Copy link
Contributor Author

ezyang commented Feb 24, 2024

sure. i forgot how exactly the backport process works lol

@Skylion007
Copy link
Collaborator

@ezyang Just cherry pick a PR against the release branch. Then when the github tracking issue is made soon, just provide a link to the main and cherry pick PR. See the issue tracking for 2.2.1 for an example: #119295

@Chillee Chillee added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 27, 2024
@ezyang ezyang added the small We think this is a small issue to fix. Consider knocking off high priority small issues label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamo-must-fix These bugs affect TorchDynamo reliability. module: dynamic shapes module: dynamo oncall: pt2 small We think this is a small issue to fix. Consider knocking off high priority small issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants