Skip to content

Static assert GetMutable is not passed with Tensor argument#11323

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

Static assert GetMutable is not passed with Tensor argument#11323
ezyang wants to merge 1 commit intomasterfrom
export-D9676205

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Sep 6, 2018

Static assert GetMutable is not passed with Tensor argument

If you do pass it this, you'll get a pointer to
UndefinedTensor; probably not what you want!

Differential Revision: D9676205

Differential Revision: D9676205
Differential Version: 57041071
@jerryzh168
Copy link
Contributor

wait I feel it should be rejected by the previous assert since Tensor is not default constructible?

@ezyang
Copy link
Contributor Author

ezyang commented Sep 7, 2018

@jerryzh168 That used to be true, but when I turned Tensor into a shared_ptr, it because default constructible again.

PenghuiCheng pushed a commit to PenghuiCheng/pytorch that referenced this pull request Sep 11, 2018
…11323)

Summary:
Pull Request resolved: pytorch#11323

If you do pass it this, you'll get a pointer to
UndefinedTensor; probably not what you want!

Reviewed By: Yangqing

Differential Revision: D9676205

fbshipit-source-id: 0bd3c22c2c40ac2958f95fc7a73b908af291cf22
@soumith soumith deleted the export-D9676205 branch February 21, 2019 12:09
@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