Skip to content

Conversation

@pzelazko-intel
Copy link
Contributor

This PR contains changes required to support MKLDNN memory layouts improving performance of MKLDNN computations.

This implementation differs from the proposed one in #10291. It is based mainly on Brian Liu implementation, which is simplified version of what I proposed previously. In this version we register MKLDNN kernels supporting MKLDNN layouts with MKLDNNLAYOUT layout. This allows us to fill tensor with MKLDNN layout before entering the MKLDNN operator.

liujianhang-design and others added 8 commits May 23, 2018 15:41
Add MKLDNN layout in Paddle so that MKLDNN friendly memory layout
can be used in MKLDNN enabled OP kernel. Before this commit, NCHW
is hardcode to be used in all MKLDNN op kernels. As a result,
non-optimized execution path is selected in MKLDNN primitive which
bring worse performance.
Besides framework change, three MKLDNN OP kernels were updated
for using new MKLDNN layout. They are conv/pool2d/batch_norm.
Other MKLDNN OP kernels need be also updated in similar way to
achieve best performance.
@CLAassistant
Copy link

CLAassistant commented May 24, 2018

CLA assistant check
All committers have signed the CLA.

@pzelazko-intel pzelazko-intel force-pushed the mkldnn-layout-new branch 2 times, most recently from 193f816 to 5d0ea0e Compare May 25, 2018 08:07
@luotao1
Copy link
Contributor

luotao1 commented May 28, 2018

As this PR is large, could you please separate it into some small PRs? such as:

  • Add MKLDNN layout support in Paddle
  • refine conv_op kernel
  • refine pool_op kernel
  • ...

@mozga-intel mozga-intel mentioned this pull request May 30, 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.

5 participants