Skip to content
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

Merged
merged 3 commits into from
Mar 10, 2018

Conversation

pzelazko-intel
Copy link
Contributor

MKLDNN pool2d OP kernels can be enabled with use_mkldnn OP flag - just like currenly present use_cudnn flag. It's set to False 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.

See the License for the specific language governing permissions and
limitations under the License. */

#include "mkldnn.hpp"
Copy link
Contributor

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.

Copy link
Contributor Author

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> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PoolMKLDNNKernel ==> PoolMKLDNNOpKernel

Name style should keep same as cudnn

What do you say @luotao1, is that necessary to solve in this PR?

same as ConvOpMkldnnKernel

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@tensor-tang tensor-tang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 4730a4b into PaddlePaddle:develop Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants