Skip to content

[TENSOR MERGE] Reorganize fields of TensorDerived into Tensor#9632

Closed
ezyang wants to merge 9 commits intopytorch:masterfrom
ezyang:pr/tensor-reorg
Closed

[TENSOR MERGE] Reorganize fields of TensorDerived into Tensor#9632
ezyang wants to merge 9 commits intopytorch:masterfrom
ezyang:pr/tensor-reorg

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Jul 20, 2018

This commit moves us towards deleting the TensorDerived classes. Billing of changes:

  • Delete nullary constructor on derived tensor class (there's a temporary helper function to help out autogenerated code)
  • Move the tensor field to the top-level class
  • Move methods which can be done in top-level class to top level

Stacked on #9627

Just these commits: https://github.com/pytorch/pytorch/pull/9632/files/22692921b17c8f8f4d5caa6aeecc303777a479d9..HEAD

This pops off refcount_, storage_, storage_offset_; there are now no more direct accesses to these fields and we can make them private (with appropriate friending).
cpuhrsch and others added 8 commits July 20, 2018 12:03
Devirtualize functions

Remove baseclass deconstructor

Add _retain
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
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