Eliminate numel == -1 state, delete Storage-only constructor#12656
Closed
Eliminate numel == -1 state, delete Storage-only constructor#12656
Conversation
Differential Revision: D10380678 Differential Version: 60667915
Differential Revision: D10380678 Differential Version: 60672880
Differential Revision: D10380678 Differential Version: 60675169
Differential Revision: D10380678 Differential Version: 60675603
Differential Revision: D10380678 Differential Version: 60728426
Differential Revision: D10380678 Differential Version: 60745432
Differential Revision: D10380678 Differential Version: 60752287
Differential Revision: D10380678 Differential Version: 60781439
Differential Revision: D10380678 Differential Version: 60819667
Differential Revision: D10380678 Differential Version: 60820092
Differential Revision: D10380678 Differential Version: 60871490
Differential Revision: D10380678 Differential Version: 61005630
Differential Revision: D10380678 Differential Version: 61036016
Differential Revision: D10380678 Differential Version: 61131697
Differential Revision: D10380678 Differential Version: 61539323
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Oct 25, 2018
Summary: Pull Request resolved: pytorch/pytorch#12656 I originally wanted to do this in two steps, but deleting the Storage-only constructor also changes the default numel state (which breaks tests), so easiest to do it all in one go.) - I still need a way to compute the correct TensorTypeId for all of the Caffe2 constructors; rather than hard-code it, I wrote a function in at::detail::computeTensorTypeId() to do this calculation. Maybe this function could be used more widely, but for now, it's used by Caffe2 only. - Added a pile more TensorTypeId for all of Caffe2's supported DeviceTypes - Because I still can't put arbitrary TypeMeta in TensorOptions, the TensorTypeId() calculation doesn't respect dtype. For now, this is not a problem, but this might block work to split non-POD dtypes into their own TensorTypeId. Reviewed By: li-roy Differential Revision: D10380678 fbshipit-source-id: 10c5d12020596fc9f27d5579adffad00513af363
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
…#12656) Summary: Pull Request resolved: pytorch#12656 I originally wanted to do this in two steps, but deleting the Storage-only constructor also changes the default numel state (which breaks tests), so easiest to do it all in one go.) - I still need a way to compute the correct TensorTypeId for all of the Caffe2 constructors; rather than hard-code it, I wrote a function in at::detail::computeTensorTypeId() to do this calculation. Maybe this function could be used more widely, but for now, it's used by Caffe2 only. - Added a pile more TensorTypeId for all of Caffe2's supported DeviceTypes - Because I still can't put arbitrary TypeMeta in TensorOptions, the TensorTypeId() calculation doesn't respect dtype. For now, this is not a problem, but this might block work to split non-POD dtypes into their own TensorTypeId. Reviewed By: li-roy Differential Revision: D10380678 fbshipit-source-id: 10c5d12020596fc9f27d5579adffad00513af363
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack:
:black_circle: #12656 Eliminate numel == -1 state, delete Storage-only constructor 💚
:white_circle: #12692 Disable CopyFrom src with uninitialized storage 💚
:white_circle: #12713 Documentation on TensorImpl. 💚
I originally wanted to do this in two steps, but deleting the Storage-only
constructor also changes the default numel state (which breaks tests),
so easiest to do it all in one go.)
Caffe2 constructors; rather than hard-code it, I wrote a function
in at::detail::computeTensorTypeId() to do this calculation. Maybe
this function could be used more widely, but for now, it's used
by Caffe2 only.
TensorTypeId() calculation doesn't respect dtype. For now, this is
not a problem, but this might block work to split non-POD dtypes
into their own TensorTypeId.
Differential Revision: D10380678