-
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 selected_rows kernel for Full #39465
Conversation
Thanks for your contribution! |
… fill_constant_sr
… fill_constant_sr
#include "paddle/pten/kernels/full_kernel.h" | ||
|
||
#include "paddle/pten/backends/cpu/cpu_context.h" | ||
#include "paddle/pten/backends/gpu/gpu_context.h" |
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.
这里引用gpu_context.h 头文件,是否需要加 #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) 宏判断?
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.
这里可以不加宏应该也没有影响,严谨一些这里先加上宏判断,后面再看情况是否保留
paddle::platform::float16, | ||
paddle::platform::bfloat16, | ||
paddle::platform::complex<float>, | ||
paddle::platform::complex<double>) {} |
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::dtype的 namespace?
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~
bool, | ||
paddle::platform::float16, | ||
paddle::platform::complex<float>, | ||
paddle::platform::complex<double>) {} |
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.
Done. thx~
const auto& str_value = | ||
paddle::any_cast<std::string>(ctx.Attr("str_value")); |
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.
有用到,case比较特殊
… fill_constant_sr
… fill_constant_sr
… fill_constant_sr
PR types
Others
PR changes
Others
Describe
新增Full算子SelectedRows类型的Kernel