Skip to content

Turn storage on UndefinedTensorImpl into nullptr.#11738

Closed
ezyang wants to merge 3 commits intomasterfrom
export-D9847859
Closed

Turn storage on UndefinedTensorImpl into nullptr.#11738
ezyang wants to merge 3 commits intomasterfrom
export-D9847859

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Sep 16, 2018

Stack:
    :black_circle:  #11738 Turn storage on UndefinedTensorImpl into nullptr.  💚

Differential Revision: D9847859

Differential Revision: D9847859
Differential Version: 57954347
Copy link
Contributor

@gchanan gchanan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conflicts, and also the constructors dont match what is in ATen (though that's a different PR).

class CAFFE2_API TensorImpl : public c10::intrusive_ptr_target {
public:
TensorImpl() = delete;
explicit TensorImpl(at::Storage&& storage) : storage_(storage) {}

This comment was marked as off-topic.

This comment was marked as off-topic.

Differential Revision: D9847859
Differential Version: 58101637
Differential Revision: D9847859
Differential Version: 58102783
iotamudelta pushed a commit to ROCm/pytorch that referenced this pull request Sep 21, 2018
Summary:
I also fix a bug that crept in while we had incorrect semantics where UndefinedTensorImpl was a CPU tensor, and thus some moves which shouldn't have been legal didn't crash. Moving out the Tensor* also moved out the Tensor* in the blob, and it's not supported to store an undefined tensor in a blob.

Pull Request resolved: pytorch#11738

Reviewed By: gchanan

Differential Revision: D9847859

fbshipit-source-id: db6be0f76a8e6526a89fd0e87b6a23b9cc820c8d
@soumith soumith deleted the export-D9847859 branch February 21, 2019 23:25
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants