-
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
[Pten]Refactor elementwise_add grad / double grad / triple grad Kernel and move them to pten #39048
[Pten]Refactor elementwise_add grad / double grad / triple grad Kernel and move them to pten #39048
Conversation
Thanks for your contribution! |
@@ -18,35 +18,13 @@ limitations under the License. */ | |||
#include <utility> | |||
#include "paddle/fluid/operators/elementwise/elementwise_op.h" | |||
|
|||
// only can include the headers in paddle/pten/include dirs |
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.
这个注释后面可以移除了
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.
下个pr处理
@@ -52,6 +53,18 @@ template struct SetConstant<platform::CPUDeviceContext, | |||
template struct SetConstant<platform::CPUDeviceContext, | |||
platform::complex<double>>; | |||
|
|||
template struct SetConstant<pten::CPUContext, platform::float16>; |
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.
这里为什么增加了pten::CPUContext
的实例化?pten::CPUContext
和platform::CPUDeviceContext
不是一样的吗?
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.
被改了,不一样了,可参考相关代码
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
将fluid下elementwise add的一阶、二阶、三阶导数迁移到pten下边