-
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
[Eager] Refactor TensorAdd by template #39282
[Eager] Refactor TensorAdd by template #39282
Conversation
Thanks for your contribution! |
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.
some comment
@@ -214,9 +214,59 @@ void TensorAddImpl(const framework::Tensor& src, framework::Tensor* dst, | |||
func(dev_ctx, src, dst); | |||
} | |||
|
|||
void TensorAdd(const framework::Variable& src, framework::Variable* dst) { | |||
template <typename VarType> | |||
std::shared_ptr<pten::DenseTensor> GetInnerDstTensor(VarType* dst) { |
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.
use overload instead of template
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.
2e1a9d2
to
cbc99da
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
PR types
Others
PR changes
Others
Describe