Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Update MKL-DNN to v0.18 release (was: fix the Dense layer issue) #13668

Merged
merged 23 commits into from
Mar 17, 2019
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d29019c
update MKL-DNN to fix Dense layer issue(#13451)
TaoLv Dec 18, 2018
c86c10d
fix format numbers
TaoLv Dec 18, 2018
290f035
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
TaoLv Dec 20, 2018
e75a0ef
update mkldnn
TaoLv Dec 20, 2018
c5de5c3
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
TaoLv Dec 24, 2018
d612a02
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
TaoLv Dec 29, 2018
512794c
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
TaoLv Mar 2, 2019
c2392a1
update mkldnn to v0.18 release
TaoLv Mar 2, 2019
0551ef3
update mklml version & fix mkldnn build
TaoLv Mar 2, 2019
85b22f9
fix typo
TaoLv Mar 2, 2019
e97f335
fix cmake
TaoLv Mar 4, 2019
849841d
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
TaoLv Mar 4, 2019
a9b3886
fix cmake
TaoLv Mar 8, 2019
99a8d10
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
TaoLv Mar 8, 2019
ac72fba
skip test_quantized_conv
TaoLv Mar 11, 2019
259f147
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
TaoLv Mar 11, 2019
38efc7e
fix quantized_conv and cmake
TaoLv Mar 12, 2019
ff9be44
Revert "fix cmake"
TaoLv Mar 12, 2019
b0e0add
update mkldnn submodule
TaoLv Mar 13, 2019
93cb7b8
update mkldnn head to 0.18.1 patch release
TaoLv Mar 16, 2019
a77c7a3
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
TaoLv Mar 16, 2019
7500ed0
empty commit to retrigger ci
TaoLv Mar 16, 2019
eb12d84
retrigger ci
TaoLv Mar 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/mkldnn
2 changes: 1 addition & 1 deletion ci/docker/install/ubuntu_mklml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
# the whole docker cache for the image

set -ex
wget -q --no-check-certificate -O /tmp/mklml.tgz https://github.com/intel/mkl-dnn/releases/download/v0.17-rc/mklml_lnx_2019.0.1.20180928.tgz
wget -q --no-check-certificate -O /tmp/mklml.tgz https://github.com/intel/mkl-dnn/releases/download/v0.18/mklml_lnx_2019.0.3.20190220.tgz
tar -zxf /tmp/mklml.tgz && cp -rf mklml_*/* /usr/local/ && rm -rf mklml_*
14 changes: 9 additions & 5 deletions cmake/DownloadMKLML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@

message(STATUS "Downloading MKLML...")

set(MKLDNN_RELEASE v0.17-rc)
set(MKLML_RELEASE_FILE_SUFFIX 2019.0.1.20180928)
set(MKLDNN_RELEASE v0.18)
set(MKLML_RELEASE_FILE_SUFFIX 2019.0.3.20190220)

set(MKLML_LNX_MD5 76354b74325cd293aba593d7cbe36b3f)
set(MKLML_WIN_MD5 02286cb980f12af610c05e99dbd78755)
set(MKLML_MAC_MD5 3b28da686a25a4cf995ca4fc5e30e514)

if(MSVC)
set(MKL_NAME "mklml_win_${MKLML_RELEASE_FILE_SUFFIX}")

file(DOWNLOAD "https://github.com/intel/mkl-dnn/releases/download/${MKLDNN_RELEASE}/${MKL_NAME}.zip"
"${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.zip"
EXPECTED_MD5 "443e661bdfd32dbbc99b460b43afceee" SHOW_PROGRESS)
EXPECTED_MD5 "${MKLML_WIM_MD5}" SHOW_PROGRESS)
szha marked this conversation as resolved.
Show resolved Hide resolved
file(DOWNLOAD "https://github.com/apache/incubator-mxnet/releases/download/utils/7z.exe"
"${CMAKE_CURRENT_BINARY_DIR}/mklml/7z2.exe"
EXPECTED_MD5 "E1CF766CF358F368EC97662D06EA5A4C" SHOW_PROGRESS)
Expand All @@ -47,7 +51,7 @@ elseif(APPLE)

file(DOWNLOAD "https://github.com/intel/mkl-dnn/releases/download/${MKLDNN_RELEASE}/${MKL_NAME}.tgz"
"${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz"
EXPECTED_MD5 "95f887af332205b1d15b392260003952" SHOW_PROGRESS)
EXPECTED_MD5 "${MKLML_MAC_MD5}" SHOW_PROGRESS)
execute_process(COMMAND "tar" "-xzf" "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz"
"-C" "${CMAKE_CURRENT_BINARY_DIR}/mklml/")

Expand All @@ -61,7 +65,7 @@ elseif(UNIX)

file(DOWNLOAD "https://github.com/intel/mkl-dnn/releases/download/${MKLDNN_RELEASE}/${MKL_NAME}.tgz"
"${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz"
EXPECTED_MD5 "a63abf155361322b9c03f8fc50f4f317" SHOW_PROGRESS)
EXPECTED_MD5 "${MKLML_LNX_MD5}" SHOW_PROGRESS)
execute_process(COMMAND "tar" "-xzf" "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz"
"-C" "${CMAKE_CURRENT_BINARY_DIR}/mklml/")

Expand Down
5 changes: 5 additions & 0 deletions mkldnn.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ ifeq ($(UNAME_S), Darwin)
OMP_LIBFILE = $(MKLDNNROOT)/lib/libiomp5.dylib
MKLML_LIBFILE = $(MKLDNNROOT)/lib/libmklml.dylib
MKLDNN_LIBFILE = $(MKLDNNROOT)/lib/libmkldnn.0.dylib
MKLDNN_LIB64FILE = $(MKLDNNROOT)/lib64/libmkldnn.0.dylib
else
OMP_LIBFILE = $(MKLDNNROOT)/lib/libiomp5.so
MKLML_LIBFILE = $(MKLDNNROOT)/lib/libmklml_intel.so
MKLDNN_LIBFILE = $(MKLDNNROOT)/lib/libmkldnn.so.0
MKLDNN_LIB64FILE = $(MKLDNNROOT)/lib64/libmkldnn.so.0
endif
endif

Expand All @@ -40,6 +42,9 @@ $(MKLDNN_LIBFILE):
cmake $(MKLDNN_SUBMODDIR) -DCMAKE_INSTALL_PREFIX=$(MKLDNNROOT) -B$(MKLDNN_BUILDDIR) -DARCH_OPT_FLAGS="-mtune=generic" -DWITH_TEST=OFF -DWITH_EXAMPLE=OFF
$(MAKE) -C $(MKLDNN_BUILDDIR) VERBOSE=1
$(MAKE) -C $(MKLDNN_BUILDDIR) install
if [ -f "$(MKLDNN_LIB64FILE)" ]; then \
mv $(MKLDNNROOT)/lib64/libmkldnn* $(MKLDNNROOT)/lib/; \
wkcn marked this conversation as resolved.
Show resolved Hide resolved
fi
mkdir -p $(MXNET_LIBDIR)
cp $(OMP_LIBFILE) $(MXNET_LIBDIR)
cp $(MKLML_LIBFILE) $(MXNET_LIBDIR)
Expand Down
2 changes: 2 additions & 0 deletions src/operator/nn/mkldnn/mkldnn_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ mkldnn_memory_format_t GetDefaultFormat(const mkldnn::memory::desc &desc) {
case mkldnn_oihw:
case mkldnn_ihwo:
case mkldnn_hwio:
case mkldnn_iohw:
case mkldnn_oIhw8i:
case mkldnn_oIhw16i:
case mkldnn_OIhw8i8o:
Expand Down Expand Up @@ -372,6 +373,7 @@ mkldnn_memory_format_t GetDefaultFormat(const mkldnn::memory::desc &desc) {
} else if (desc.data.ndims == 5) {
switch (desc.data.format) {
case mkldnn_goihw:
case mkldnn_giohw:
case mkldnn_hwigo:
case mkldnn_hwigo_s8s8:
case mkldnn_gOIhw8i8o:
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/operator/mkldnn_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void VerifyDefMem(const mkldnn::memory &mem) {

TEST(MKLDNN_UTIL_FUNC, MemFormat) {
// Check whether the number of format is correct.
CHECK_EQ(mkldnn_format_last, 112);
CHECK_EQ(mkldnn_format_last, 114);
CHECK_EQ(mkldnn_nchw, 7);
CHECK_EQ(mkldnn_oihw, 16);
}
Expand Down