Skip to content

Commit 34e9e59

Browse files
authored
Merge pull request #14333 from kbinias/change-hardcoded-format-and-bump-mkldnn-version
Changed hardcoded format to any in convolution and bumped MKL-DNN version to 0.17rc
2 parents f8b2680 + 0801122 commit 34e9e59

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cmake/external/mkldnn.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ IF(${CBLAS_PROVIDER} STREQUAL "MKLML")
4545
ELSE()
4646
MESSAGE(FATAL_ERROR "Should enable MKLML when build MKLDNN")
4747
ENDIF()
48-
SET(MKLDNN_FLAG "-Wno-error=strict-overflow -Wno-error=unused-result")
48+
SET(MKLDNN_FLAG "-Wno-error=strict-overflow -Wno-error=unused-result -Wno-error=array-bounds")
4949
SET(MKLDNN_FLAG "${MKLDNN_FLAG} -Wno-unused-result -Wno-unused-value")
5050
SET(MKLDNN_CFLAG "${CMAKE_C_FLAGS} ${MKLDNN_FLAG}")
5151
SET(MKLDNN_CXXFLAG "${CMAKE_CXX_FLAGS} ${MKLDNN_FLAG}")
@@ -54,7 +54,7 @@ ExternalProject_Add(
5454
${EXTERNAL_PROJECT_LOG_ARGS}
5555
DEPENDS ${MKLDNN_DEPENDS}
5656
GIT_REPOSITORY "https://github.com/01org/mkl-dnn.git"
57-
GIT_TAG "64e03a1939e0d526aa8e9f2e3f7dc0ad8d372944"
57+
GIT_TAG "21fb5f2af1dd14e132af4f1b79160977ee487818"
5858
PREFIX ${MKLDNN_SOURCES_DIR}
5959
UPDATE_COMMAND ""
6060
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}

paddle/fluid/operators/conv_mkldnn_op.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,7 @@ class ConvMKLDNNOpKernel : public paddle::framework::OpKernel<T> {
375375
auto src_md = platform::MKLDNNMemDesc(
376376
src_tz, platform::MKLDNNGetDataType<T>(), chosen_memory_format);
377377
auto weights_md = platform::MKLDNNMemDesc(
378-
weights_tz, platform::MKLDNNGetDataType<T>(),
379-
(g == 1) ? chosen_memory_format : mkldnn::memory::format::goihw);
378+
weights_tz, platform::MKLDNNGetDataType<T>(), chosen_memory_format);
380379
std::vector<int> bias_tz; // TODO(mgallus): avoid empty vector creation.
381380
// Currently used whenever bias is != nullptr.
382381
auto dst_md = platform::MKLDNNMemDesc(

0 commit comments

Comments
 (0)