-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[PyTorch] Delete NestedTensor Python wrapper #74691
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
Conversation
The wrapper just called through to methods on the underlying Tensor. Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/) [ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 8b3a629 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
The wrapper just called through to methods on the underlying Tensor. Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/) ghstack-source-id: 152119329 Pull Request resolved: #74691
The wrapper just called through to methods on the underlying Tensor. Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/) [ghstack-poisoned]
Pull Request resolved: #74691 The wrapper just called through to methods on the underlying Tensor. ghstack-source-id: 152147833 Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/)
The wrapper just called through to methods on the underlying Tensor. Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/) [ghstack-poisoned]
Pull Request resolved: #74691 The wrapper just called through to methods on the underlying Tensor. ghstack-source-id: 152159577 Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/)
The wrapper just called through to methods on the underlying Tensor. Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/) [ghstack-poisoned]
Pull Request resolved: #74691 The wrapper just called through to methods on the underlying Tensor. ghstack-source-id: 152223291 Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/)
The wrapper just called through to methods on the underlying Tensor. Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/) [ghstack-poisoned]
Pull Request resolved: #74691 The wrapper just called through to methods on the underlying Tensor. ghstack-source-id: 152399357 Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/)
The wrapper just called through to methods on the underlying Tensor. Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/) [ghstack-poisoned]
Pull Request resolved: #74691 The wrapper just called through to methods on the underlying Tensor. ghstack-source-id: 152433754 Differential Revision: [D34689789](https://our.internmc.facebook.com/intern/diff/D34689789/)
Summary: Pull Request resolved: #74691 The wrapper just called through to methods on the underlying Tensor. ghstack-source-id: 152433754 Test Plan: existing tests Reviewed By: ezyang Differential Revision: D34689789 fbshipit-source-id: cf53476780cf3ed00a3aa4add441300bfe8e27ce
|
Now that the wrapper is deleted is there any way to distinguish between a nested tensor and a regular tensor? Currently I have two work arounds: try:
tensor.shape
is_nested = False
except RuntimeError as ex:
is_nested = "NestedTensorImpl" in str(ex)or is_nested = "nested_tensor" in str(tensor)The former is very slow because of the try except perfomace. The latter requires a copy to the CPU for the print. |
|
@mattangus - I agree that we should have something here. Could I kindly ask you to open a separate issue? Also, as a user of this new prototype feature maybe you want to share more what your use case is and what you have planned for NestedTensor? |
|
#73999 added Tensor.is_nested |
Stack from ghstack (oldest at bottom):
The wrapper just called through to methods on the underlying Tensor.
Differential Revision: D34689789