-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Unify Tensors PR #5] framework::Tensor inherits from DenseTensor,test=allcases #38632
[Unify Tensors PR #5] framework::Tensor inherits from DenseTensor,test=allcases #38632
Conversation
…faces accordingly
… allocation_rearrange_pr
… allocation_rearrange_pr
… allocation_rearrange_pr PaddlePaddle#2
… allocation_rearrange_pr
… densetensor_interface_change
…to pten::DenseTensor
… densetensor_interface_change
… densetensor_interface_change
… densetensor_interface_change
… densetensor_interface_change
… densetensor_interface_change
… densetensor_interface_change
Thanks for your contribution! |
… densetensor_interface_change
… densetensor_interface_change
513b868
to
7c6b10f
Compare
648a699
to
c8737e8
Compare
c8737e8
to
d35f7d1
Compare
d35f7d1
to
1d38ca0
Compare
… tensor_inherit_from_dense_tensor
6fa06a6
to
2d91053
Compare
… tensor_inherit_from_dense_tensor
f8c4a19
to
9b62071
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please describe the reason behind the change more clearly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
Others
Describe
Previous works on constructing new tensor library "pten" introduced another Tensor type namely "DenseTensor", which temporarily co-exists with framework::Tensor and LoDTensor. In this series of PRs, we attempt to replace legacy "framework::Tensor and LoDTensor" by the newly implemented "DenseTensor", so as to facilitate the progress of "pten" joining original framework.
In this PR, we moved nearly all the members and interfaces from framework::Tensor to pten::DenseTensor, and then asked framework::Tensor to inherit from pten::DenseTensor. Note that interfaces (Split, Chunk, Slice, ...) with "framework::Tensor" as return will remain on framework::Tensor for now.
After this patch, all the original access to framework::Tensor interfaces will be re-routed
to accessing the corresponding interfaces on pten::DenseTensor, whereas framework::Tensor will become a simple wrapper that almost holds nothing.