diff --git a/.gitmodules b/.gitmodules index 1900820d4c86..b215ed430d14 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/3rdparty/mkldnn b/3rdparty/mkldnn index cb2cc7ac17ff..07579e6c0c68 160000 --- a/3rdparty/mkldnn +++ b/3rdparty/mkldnn @@ -1 +1 @@ -Subproject commit cb2cc7ac17ff4e2ef50805c7048d33256d82be4d +Subproject commit 07579e6c0c6839a390a6f3040e05a2b2c71e628a diff --git a/tests/cpp/operator/mkldnn_test.cc b/tests/cpp/operator/mkldnn_test.cc index bcdb38ac4aa8..973c398026a7 100644 --- a/tests/cpp/operator/mkldnn_test.cc +++ b/tests/cpp/operator/mkldnn_test.cc @@ -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); } diff --git a/tests/cpp/unittest.mk b/tests/cpp/unittest.mk index 56d13850472a..2c674b9ec9d7 100644 --- a/tests/cpp/unittest.mk +++ b/tests/cpp/unittest.mk @@ -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_) @@ -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)