-
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
MKLDNN pool2d OP kernel added #8879
MKLDNN pool2d OP kernel added #8879
Conversation
ddeb663
to
1955297
Compare
1955297
to
fbaea05
Compare
See the License for the specific language governing permissions and | ||
limitations under the License. */ | ||
|
||
#include "mkldnn.hpp" |
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.
mkldnn.hpp
is included in mkldnn_helper.h
.
Same as conv op.
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
namespace operators { | ||
|
||
template <typename T> | ||
class PoolMkldnnKernel : public paddle::framework::OpKernel<T> { |
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.
I think this can be solved in this PR, since there are only two Kernels which should be renamed now.
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
I additionally added commit with refactoring of mkldnn convolution to align to the pooling kernel style.
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
MKLDNN pool2d OP kernels can be enabled with
use_mkldnn
OP flag - just like currenly present use_cudnn flag. It's set toFalse
by default.use_cudnn
flag has figher priority.Beside unit tests, we validated these kernels by running training and interference on MNIST dataset and comparing results with caffe library.