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
[JIT] Fix torch.tensor for empty multidimensional-typed lists #44652
Conversation
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.
@eellison has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Out of curiosity, is this the assert in question: https://fburl.com/diffusion/am1ysuge |
It was this assert failure: https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/runtime/register_special_ops.cpp#L181 bc |
Codecov Report
@@ Coverage Diff @@
## master #44652 +/- ##
=======================================
Coverage 67.97% 67.97%
=======================================
Files 384 384
Lines 49579 49579
=======================================
+ Hits 33702 33703 +1
+ Misses 15877 15876 -1
Continue to review full report at Codecov.
|
Summary: We were hitting an assert error when you passed in an empty `List[List[int]]` - this fixes that error by not recursing into 0-element tensors. Pull Request resolved: #44652 Reviewed By: ZolotukhinM Differential Revision: D23688247 Pulled By: eellison fbshipit-source-id: d48ea24893044fae96bc39f76c0f1f9726eaf4c7
We were hitting an assert error when you passed in an empty
List[List[int]]
- this fixes that error by not recursing into 0-element tensors.