-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add pool2d cudnn op #4636
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 pool2d cudnn op #4636
Conversation
75a2f0f to
104ca74
Compare
846e479 to
8c51a0d
Compare
92b75fd to
91caf62
Compare
80f8bf7 to
4b82b2f
Compare
e5d7580 to
926b90f
Compare
0b12868 to
74abe6b
Compare
74abe6b to
a4274d3
Compare
28b534c to
8149e6d
Compare
4e7c1de to
2d7d43f
Compare
1c7f783 to
7f34029
Compare
paddle/operators/pool_op.cc
Outdated
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.
Google C++ style did not specify the constant string naming rules, but since this attribute is going to be used when user define operators using python, following python style seems resonable?
paddle/operators/pool_op.cc
Outdated
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.
(string), pooling type, can be "max" for max-pooling and "avg" for average-pooling.
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
paddle/operators/pool_op.cc
Outdated
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.
Remove "and need not be specified".
Ignored means whether a user is providing this value, it's not used.
"need not be specified" means the user should never provide this value, or else it will cause error.
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
paddle/operators/pool_op.cc
Outdated
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.
Pooling 3d and 2d seem to have very similar description documents, They can be merged into one OpMaker using the same description, like:
(vector), the pooling window size of pooling operator, for 3d pooling the layout should be (depth, height, width), for 2d it should be (height, width). ...
paddle/operators/pool_cudnn_op.cu
Outdated
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.
You can put this function to ddim.cc.
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
paddle/operators/pool_cudnn_op.h
Outdated
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.
Can remove this file and move #include to pool_cudnn_op.cu.
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.
Currently, this header file is necessary to register as two op (pool2d_cudnn, pool2d_cudnn).
We can talk abort this in next PR.
|
The change of attr name causes CI error: |
7f34029 to
df48b43
Compare
9582e85 to
cadee84
Compare
typhoonzero
left a comment
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++
fix #4637
Add pool cudnn op.