-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[PTen] Add compatible reshape method for Tensor #37281
[PTen] Add compatible reshape method for Tensor #37281
Conversation
Thanks for your contribution! |
… pten/add_reshape_method_for_custom_op
paddle/pten/api/lib/tensor.cc
Outdated
"instead. " | ||
"reason: `reshape` means changing the tensor shape without " | ||
"touching underlying data, this requires the total size of " | ||
"the tensor to remains constant."; |
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.
to remains => to remain
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.
done, thx
… pten/add_reshape_method_for_custom_op
paddle/pten/api/lib/tensor.cc
Outdated
framework::make_ddim(shape)); | ||
} else { | ||
PADDLE_THROW(platform::errors::Unimplemented( | ||
"Only supported reshape operation on DenseTensor now.")); |
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.
support?
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.
done, thx
fd092f3
… pten/add_reshape_method_for_custom_op
PR types
Function optimization
PR changes
APIs
Describe
[PTen] Add compatible reshape method for Tensor
#37122 的TODO事项之一,恢复Tensor的reshape接口支持,确保兼容,目前reshape本质上仍是底层Tensor的Resize功能,由于这里reshape接口的含义和Python端reshape接口含义有出入,所以这里的reshape将会deprecated