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

[v1.x] Update 3rdparty/mkldnn remote URL and pin to v1.3 (#17972) #18033

Merged
merged 3 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
url = https://github.com/google/googletest.git
[submodule "3rdparty/mkldnn"]
path = 3rdparty/mkldnn
url = https://github.com/intel/mkl-dnn.git
branch = master
url = https://github.com/oneapi-src/oneDNN.git
[submodule "3rdparty/tvm"]
path = 3rdparty/tvm
url = https://github.com/apache/incubator-tvm.git
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/mkldnn
Submodule mkldnn updated 1217 files
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ if(USE_MKLDNN)
set(MKLDNN_ARCH_OPT_FLAGS "" CACHE INTERNAL "" FORCE)
set(MKLDNN_ENABLE_JIT_PROFILING OFF CACHE INTERNAL "" FORCE)
set(MKLDNN_LIBRARY_TYPE STATIC CACHE INTERNAL "" FORCE)
set(DNNL_ENABLE_CONCURRENT_EXEC ON CACHE INTERNAL "" FORCE)

if(NOT USE_OPENMP)
set(MKLDNN_CPU_RUNTIME SEQ CACHE INTERNAL "" FORCE)
Expand Down
15 changes: 14 additions & 1 deletion ci/docker/install/centos7_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,23 @@ yum -y install atlas-devel # Provide clbas headerfiles
yum -y install openblas-devel
yum -y install lapack-devel
yum -y install opencv-devel
yum -y install protobuf-compiler
yum -y install protobuf-devel
yum -y install zeromq-devel
yum -y install openssl-devel
yum -y install gcc-c++-4.8.*
yum -y install make
yum -y install cmake
yum -y install wget
yum -y install unzip
yum -y install ninja-build

# Centos 7 only provides ninja-build
ln -s /usr/bin/ninja-build /usr/bin/ninja

# CMake 3.13.2+ is required
mkdir /opt/cmake && cd /opt/cmake
wget -nv https://cmake.org/files/v3.13/cmake-3.13.5-Linux-x86_64.sh
sh cmake-3.13.5-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
rm cmake-3.13.5-Linux-x86_64.sh
cmake --version
1 change: 1 addition & 0 deletions mkldnn.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ mkldnn_FLAGS += -DMKLDNN_BUILD_TESTS=OFF
mkldnn_FLAGS += -DMKLDNN_BUILD_EXAMPLES=OFF
mkldnn_FLAGS += -DMKLDNN_ENABLE_JIT_PROFILING=OFF
mkldnn_FLAGS += -DMKLDNN_LIBRARY_TYPE=STATIC
mkldnn_FLAGS += -DDNNL_ENABLE_CONCURRENT_EXEC=ON

ifneq ($(USE_OPENMP), 1)
mkldnn_FLAGS += -DMKLDNN_CPU_RUNTIME=SEQ
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_tag_last, 131);
CHECK_EQ(mkldnn_format_tag_last, 154);
CHECK_EQ(mkldnn_nchw, 5);
CHECK_EQ(mkldnn_oihw, 5);
}
Expand Down
7 changes: 6 additions & 1 deletion tests/cpp/unittest.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ TEST_CFLAGS += -I/usr/local/include/breakpad
TEST_LDFLAGS += -lbreakpad_client -lbreakpad
endif

TEST_LIB_DEP = gtest.a
ifeq ($(USE_MKLDNN), 1)
TEST_LIB_DEP += $(MKLDNNROOT)/lib/libdnnl.a
endif

.PHONY: runtest testclean

gtest-all.o : $(GTEST_SRCS_)
Expand Down Expand Up @@ -67,7 +72,7 @@ build/tests/cpp/thread_safety/%.o : tests/cpp/thread_safety/%.cc | mkldnn
$(CXX) -std=c++11 $(TEST_CFLAGS) $(TEST_CPPFLAGS) -I$(GTEST_INC) -MM -MT tests/cpp/thread_safety/$* $< > build/tests/cpp/thread_safety/$*.d
$(CXX) -c -std=c++11 $(TEST_CFLAGS) $(TEST_CPPFLAGS) -I$(GTEST_INC) -o build/tests/cpp/thread_safety/$*.o $(filter %.cc %.a, $^)

$(TEST): $(TEST_OBJ) lib/libmxnet.so gtest.a
$(TEST): $(TEST_OBJ) lib/libmxnet.so $(TEST_LIB_DEP)
$(CXX) -std=c++11 $(TEST_CFLAGS) -I$(GTEST_INC) -o $@ $^ $(TEST_LDFLAGS)

runtest: $(TEST)
Expand Down