Skip to content

Give default values to members of TensorImpl.#12033

Closed
ezyang wants to merge 1 commit intomasterfrom
export-D10024439
Closed

Give default values to members of TensorImpl.#12033
ezyang wants to merge 1 commit intomasterfrom
export-D10024439

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Sep 25, 2018

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

Differential Revision: D10024439
Differential Version: 58766831

private:
int64_t storage_offset_;
int64_t storage_offset_ = 0;

This comment was marked as off-topic.

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
@soumith soumith deleted the export-D10024439 branch February 21, 2019 12:10
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants