Give default values to members of TensorImpl.#12033
Closed
Conversation
Differential Revision: D10024439 Differential Version: 58766831
gchanan
approved these changes
Sep 25, 2018
|
|
||
| private: | ||
| int64_t storage_offset_; | ||
| int64_t storage_offset_ = 0; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Sep 25, 2018
Summary: Pull Request resolved: pytorch/pytorch#12033 These are reasonable sensible default values. One key pick is -1 for numel: this is because in Caffe2, a tensor may be in "un-allocated" with no storage state; this is historically represented in Caffe2 with numel_ == -1 Reviewed By: mingzhe09088 Differential Revision: D10024439 fbshipit-source-id: a167d727a7665daac7e7a1e98c0c89d8f1da6fa6
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: #12033 Give default values to members of TensorImpl. 💛
These are reasonable sensible default values. One key
pick is -1 for numel: this is because in Caffe2, a tensor
may be in "un-allocated" with no storage state; this is
historically represented in Caffe2 with numel_ == -1
Differential Revision: D10024439