From 23d96cf22181e58b52c3c9a82692354daca5803a Mon Sep 17 00:00:00 2001 From: Jacek Czaja Date: Tue, 9 Mar 2021 12:45:41 +0100 Subject: [PATCH] [oneDNN] bumpup onednn 2.2 fixup version (#31473) * - introduced fix onednn 2.2 version * - compilation fix --- cmake/external/mkldnn.cmake | 2 +- paddle/fluid/operators/mkldnn/conv_mkldnn_op.cc | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cmake/external/mkldnn.cmake b/cmake/external/mkldnn.cmake index e41d8fdb6daac..884219d8dd81f 100644 --- a/cmake/external/mkldnn.cmake +++ b/cmake/external/mkldnn.cmake @@ -20,7 +20,7 @@ SET(MKLDNN_SOURCE_DIR ${THIRD_PARTY_PATH}/mkldnn/src/extern_mkldnn) SET(MKLDNN_INSTALL_DIR ${THIRD_PARTY_PATH}/install/mkldnn) SET(MKLDNN_INC_DIR "${MKLDNN_INSTALL_DIR}/include" CACHE PATH "mkldnn include directory." FORCE) SET(MKLDNN_REPOSITORY ${GIT_URL}/oneapi-src/oneDNN.git) -SET(MKLDNN_TAG 3d53cd3f17ce7ca365c980f0e1e50359751ca038) +SET(MKLDNN_TAG 72efa005effb49595933e033cc732f215ef0445a) # Introduce variables: # * CMAKE_INSTALL_LIBDIR diff --git a/paddle/fluid/operators/mkldnn/conv_mkldnn_op.cc b/paddle/fluid/operators/mkldnn/conv_mkldnn_op.cc index 05b71e14c52c2..73530eac09e99 100644 --- a/paddle/fluid/operators/mkldnn/conv_mkldnn_op.cc +++ b/paddle/fluid/operators/mkldnn/conv_mkldnn_op.cc @@ -981,12 +981,7 @@ class ConvMKLDNNGradOpKernel : public paddle::framework::OpKernel { * ('any') which lets a primitive (conv backward in this case) choose * the memory format preferred for best performance */ - // TODO: NHWC is preferred starting from oneDNN 2.1 . Any may crash - auto chosen_memory_format = - platform::MayIUse(platform::cpu_isa_t::avx512_core) && - is_conv3d == false - ? MKLDNNMemoryFormat::nhwc - : MKLDNNMemoryFormat::any; + auto chosen_memory_format = MKLDNNMemoryFormat::any; weights_format = MKLDNNMemoryFormat::any; auto src_md = platform::MKLDNNMemDesc(