-
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
Add Sparse OP Maxpool #40569
Add Sparse OP Maxpool #40569
Conversation
… conv3d_gpu_backward
… conv3d_gpu_backward
… into conv3d_gpu_backward
… conv3d_gpu_backward
… conv3d_gpu_backward
Thanks for your contribution! |
for (int i = 0; i < kernel_size; i++) { | ||
if (counter[i] <= 0) { | ||
continue; | ||
} |
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
dev_ctx.stream()); | ||
dev_ctx.Wait(); | ||
for (int i = 0; i < rulebook_len; i++) { | ||
counter[h_counter[i]] += 1; |
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.
h_counter 建议改下名称
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.
ok,下一个PR改。
#include "paddle/phi/kernels/funcs/pooling.h" | ||
#include "paddle/phi/kernels/funcs/sparse/convolution.h" | ||
|
||
#include "paddle/phi/kernels/sparse/sparse_pool_grad_kernel.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.
kernel头文件在最前面
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里再调整
#include "paddle/phi/kernels/funcs/pooling.h" | ||
#include "paddle/phi/kernels/funcs/sparse/convolution.h" | ||
#include "paddle/phi/kernels/sparse/gpu/convolution.cu.h" | ||
#include "paddle/phi/kernels/sparse/sparse_pool_kernel.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.
同上
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 overall,细节问题可以后续再完善下
PR types
New features
PR changes
OPs
Describe
新增Sparse算子:MaxPool,同样采用预先生成输入输出映射表rulebook来进行max pool的计算,rulebook的生成参考PR,需要调用ProductRuleBook,依赖PR