Created by: jczaja
This PR is a continuation of #21375 to fulfill requirements of #20912
Changes:
- conv2d and conv2d_transpose MKL-DNN kernels support NHWC (FWD only)
- Some refactoring pointed out #21375 e.g. TransformDataLayoutFromMKLDNN() was surrounded by PADDLE_WITH_MKLDNN .
- Proposal of refactoring of TLS MKL-DNN variables as requested in #18944 (closed)
Note:
- There is performance degradation with this PR when paddle using MKL-DNN is executing training of convolutional model. Inference is fine. This will be fixed when Grad NHWC is supported. If you think that this is not acceptable for time being then please let me know so I can prepare some fast fix.