From 031dc5b7c2b7f5c1cb61d0193b048c0d77abb9d8 Mon Sep 17 00:00:00 2001 From: bartekkuncer Date: Mon, 8 Feb 2021 17:09:40 +0100 Subject: [PATCH] [1.x][submodule] Upgrade oneDNN to v2.0 (#19670) --- .gitignore | 4 ++-- 3rdparty/mkldnn | 2 +- CMakeLists.txt | 4 ++-- cd/mxnet_lib/static/Jenkins_pipeline.groovy | 2 +- cd/python/pypi/pypi_package.sh | 6 +++--- include/mkldnn/dnnl_config.h | 1 + include/mkldnn/dnnl_debug.h | 1 + include/mkldnn/dnnl_ocl.h | 1 + include/mkldnn/dnnl_ocl.hpp | 1 + include/mkldnn/dnnl_sycl.h | 1 + include/mkldnn/dnnl_sycl.hpp | 1 + include/mkldnn/dnnl_sycl_types.h | 1 + include/mkldnn/dnnl_threadpool.h | 1 + include/mkldnn/dnnl_threadpool.hpp | 1 + include/mkldnn/dnnl_threadpool_iface.hpp | 1 + include/mkldnn/dnnl_version.h | 1 + include/mkldnn/mkldnn_config.h | 1 + include/mkldnn/mkldnn_debug.h | 1 + include/mkldnn/oneapi/dnnl/dnnl.h | 1 + include/mkldnn/oneapi/dnnl/dnnl.hpp | 1 + include/mkldnn/oneapi/dnnl/dnnl_debug.h | 1 + include/mkldnn/oneapi/dnnl/dnnl_ocl.h | 1 + include/mkldnn/oneapi/dnnl/dnnl_ocl.hpp | 1 + include/mkldnn/oneapi/dnnl/dnnl_sycl.h | 1 + include/mkldnn/oneapi/dnnl/dnnl_sycl.hpp | 1 + include/mkldnn/oneapi/dnnl/dnnl_sycl_types.h | 1 + include/mkldnn/oneapi/dnnl/dnnl_threadpool.h | 1 + include/mkldnn/oneapi/dnnl/dnnl_threadpool.hpp | 1 + include/mkldnn/oneapi/dnnl/dnnl_threadpool_iface.hpp | 1 + include/mkldnn/oneapi/dnnl/dnnl_types.h | 1 + mkldnn.mk | 8 ++++---- 31 files changed, 38 insertions(+), 13 deletions(-) create mode 120000 include/mkldnn/dnnl_config.h create mode 120000 include/mkldnn/dnnl_debug.h create mode 120000 include/mkldnn/dnnl_ocl.h create mode 120000 include/mkldnn/dnnl_ocl.hpp create mode 120000 include/mkldnn/dnnl_sycl.h create mode 120000 include/mkldnn/dnnl_sycl.hpp create mode 120000 include/mkldnn/dnnl_sycl_types.h create mode 120000 include/mkldnn/dnnl_threadpool.h create mode 120000 include/mkldnn/dnnl_threadpool.hpp create mode 120000 include/mkldnn/dnnl_threadpool_iface.hpp create mode 120000 include/mkldnn/dnnl_version.h create mode 120000 include/mkldnn/mkldnn_config.h create mode 120000 include/mkldnn/mkldnn_debug.h create mode 120000 include/mkldnn/oneapi/dnnl/dnnl.h create mode 120000 include/mkldnn/oneapi/dnnl/dnnl.hpp create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_debug.h create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_ocl.h create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_ocl.hpp create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_sycl.h create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_sycl.hpp create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_sycl_types.h create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_threadpool.h create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_threadpool.hpp create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_threadpool_iface.hpp create mode 120000 include/mkldnn/oneapi/dnnl/dnnl_types.h diff --git a/.gitignore b/.gitignore index 9fafdb13cb7e..e24c0c5e9a19 100644 --- a/.gitignore +++ b/.gitignore @@ -169,5 +169,5 @@ coverage.xml cmake_options.yml # header file generated at compile time -include/mkldnn/dnnl_version.h -include/mkldnn/dnnl_config.h +include/mkldnn/oneapi/dnnl/dnnl_version.h +include/mkldnn/oneapi/dnnl/dnnl_config.h diff --git a/3rdparty/mkldnn b/3rdparty/mkldnn index 2e4732679f02..83ebc40d86bc 160000 --- a/3rdparty/mkldnn +++ b/3rdparty/mkldnn @@ -1 +1 @@ -Subproject commit 2e4732679f0211bb311780d0f383cf2dce9baca7 +Subproject commit 83ebc40d86bc54f0f23e947235e53570eeacf254 diff --git a/CMakeLists.txt b/CMakeLists.txt index 09ccf4410675..6e93e0b3876c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -815,9 +815,9 @@ endif() if(USE_MKLDNN) add_custom_command(TARGET mxnet POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_BINARY_DIR}/3rdparty/mkldnn/include/dnnl_config.h ${CMAKE_SOURCE_DIR}/include/mkldnn/ + ${CMAKE_BINARY_DIR}/3rdparty/mkldnn/include/oneapi/dnnl/dnnl_config.h ${CMAKE_SOURCE_DIR}/include/mkldnn/oneapi/dnnl/ COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_BINARY_DIR}/3rdparty/mkldnn/include/dnnl_version.h ${CMAKE_SOURCE_DIR}/include/mkldnn/) + ${CMAKE_BINARY_DIR}/3rdparty/mkldnn/include/oneapi/dnnl/dnnl_version.h ${CMAKE_SOURCE_DIR}/include/mkldnn/oneapi/dnnl/) endif() if(USE_INTGEMM) diff --git a/cd/mxnet_lib/static/Jenkins_pipeline.groovy b/cd/mxnet_lib/static/Jenkins_pipeline.groovy index fe2e71c06667..c3eb17a4e3cd 100644 --- a/cd/mxnet_lib/static/Jenkins_pipeline.groovy +++ b/cd/mxnet_lib/static/Jenkins_pipeline.groovy @@ -33,7 +33,7 @@ licenses = 'licenses/*' // libmxnet dependencies mx_native_deps = 'lib/libgfortran.so.3' -mx_deps = 'lib/libgfortran.so.3, 3rdparty/mkldnn/build/install/include/dnnl_version.h, 3rdparty/mkldnn/build/install/include/dnnl_config.h' +mx_deps = 'lib/libgfortran.so.3, 3rdparty/mkldnn/build/install/include/oneapi/dnnl/dnnl_version.h, 3rdparty/mkldnn/build/install/include/oneapi/dnnl/dnnl_config.h' // library type // either static or dynamic - depending on how it links to its dependencies diff --git a/cd/python/pypi/pypi_package.sh b/cd/python/pypi/pypi_package.sh index 1e8103bdfca7..998b0c16a1dc 100755 --- a/cd/python/pypi/pypi_package.sh +++ b/cd/python/pypi/pypi_package.sh @@ -28,9 +28,9 @@ export mxnet_variant=${1:?"Please specify the mxnet variant"} # and CD unpacks it to a directory called cd_misc # Nov. 2019 Update: With v1.1, MKL-DNN is renaming to DNNL. Hence changing the prefix of file name. if [ -f "cd_misc/dnnl_version.h" ]; then - mkdir -p 3rdparty/mkldnn/include - cp cd_misc/dnnl_version.h 3rdparty/mkldnn/include/. - cp cd_misc/dnnl_config.h 3rdparty/mkldnn/include/. + mkdir -p 3rdparty/mkldnn/include/oneapi/dnnl + cp cd_misc/dnnl_version.h 3rdparty/mkldnn/include/oneapi/dnnl/. + cp cd_misc/dnnl_config.h 3rdparty/mkldnn/include/oneapi/dnnl/. fi # Create wheel workspace diff --git a/include/mkldnn/dnnl_config.h b/include/mkldnn/dnnl_config.h new file mode 120000 index 000000000000..ff3719dfc04c --- /dev/null +++ b/include/mkldnn/dnnl_config.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_config.h \ No newline at end of file diff --git a/include/mkldnn/dnnl_debug.h b/include/mkldnn/dnnl_debug.h new file mode 120000 index 000000000000..db549eddc337 --- /dev/null +++ b/include/mkldnn/dnnl_debug.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_debug.h \ No newline at end of file diff --git a/include/mkldnn/dnnl_ocl.h b/include/mkldnn/dnnl_ocl.h new file mode 120000 index 000000000000..ecc7f34288a4 --- /dev/null +++ b/include/mkldnn/dnnl_ocl.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_ocl.h \ No newline at end of file diff --git a/include/mkldnn/dnnl_ocl.hpp b/include/mkldnn/dnnl_ocl.hpp new file mode 120000 index 000000000000..3f4fec4277cc --- /dev/null +++ b/include/mkldnn/dnnl_ocl.hpp @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_ocl.hpp \ No newline at end of file diff --git a/include/mkldnn/dnnl_sycl.h b/include/mkldnn/dnnl_sycl.h new file mode 120000 index 000000000000..4c1bfe51acf1 --- /dev/null +++ b/include/mkldnn/dnnl_sycl.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_sycl.h \ No newline at end of file diff --git a/include/mkldnn/dnnl_sycl.hpp b/include/mkldnn/dnnl_sycl.hpp new file mode 120000 index 000000000000..8837231daae0 --- /dev/null +++ b/include/mkldnn/dnnl_sycl.hpp @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_sycl.hpp \ No newline at end of file diff --git a/include/mkldnn/dnnl_sycl_types.h b/include/mkldnn/dnnl_sycl_types.h new file mode 120000 index 000000000000..94461bc3d449 --- /dev/null +++ b/include/mkldnn/dnnl_sycl_types.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_sycl_types.h \ No newline at end of file diff --git a/include/mkldnn/dnnl_threadpool.h b/include/mkldnn/dnnl_threadpool.h new file mode 120000 index 000000000000..5ed7f6431e3d --- /dev/null +++ b/include/mkldnn/dnnl_threadpool.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_threadpool.h \ No newline at end of file diff --git a/include/mkldnn/dnnl_threadpool.hpp b/include/mkldnn/dnnl_threadpool.hpp new file mode 120000 index 000000000000..dff43b044767 --- /dev/null +++ b/include/mkldnn/dnnl_threadpool.hpp @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_threadpool.hpp \ No newline at end of file diff --git a/include/mkldnn/dnnl_threadpool_iface.hpp b/include/mkldnn/dnnl_threadpool_iface.hpp new file mode 120000 index 000000000000..f651ff17f10a --- /dev/null +++ b/include/mkldnn/dnnl_threadpool_iface.hpp @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_threadpool_iface.hpp \ No newline at end of file diff --git a/include/mkldnn/dnnl_version.h b/include/mkldnn/dnnl_version.h new file mode 120000 index 000000000000..a4fde025b179 --- /dev/null +++ b/include/mkldnn/dnnl_version.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/dnnl_version.h \ No newline at end of file diff --git a/include/mkldnn/mkldnn_config.h b/include/mkldnn/mkldnn_config.h new file mode 120000 index 000000000000..8f5259e54d1a --- /dev/null +++ b/include/mkldnn/mkldnn_config.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/mkldnn_config.h \ No newline at end of file diff --git a/include/mkldnn/mkldnn_debug.h b/include/mkldnn/mkldnn_debug.h new file mode 120000 index 000000000000..a67617c2942a --- /dev/null +++ b/include/mkldnn/mkldnn_debug.h @@ -0,0 +1 @@ +../../3rdparty/mkldnn/include/mkldnn_debug.h \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl.h b/include/mkldnn/oneapi/dnnl/dnnl.h new file mode 120000 index 000000000000..ee11f505f1d2 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl.h @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl.h \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl.hpp b/include/mkldnn/oneapi/dnnl/dnnl.hpp new file mode 120000 index 000000000000..22635d614bd3 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl.hpp @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl.hpp \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_debug.h b/include/mkldnn/oneapi/dnnl/dnnl_debug.h new file mode 120000 index 000000000000..982bc2191721 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_debug.h @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_debug.h \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_ocl.h b/include/mkldnn/oneapi/dnnl/dnnl_ocl.h new file mode 120000 index 000000000000..85970c1e1f0e --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_ocl.h @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_ocl.h \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_ocl.hpp b/include/mkldnn/oneapi/dnnl/dnnl_ocl.hpp new file mode 120000 index 000000000000..4fcef2ca93b9 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_ocl.hpp @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_ocl.hpp \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_sycl.h b/include/mkldnn/oneapi/dnnl/dnnl_sycl.h new file mode 120000 index 000000000000..e39828aeacbb --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_sycl.h @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_sycl.h \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_sycl.hpp b/include/mkldnn/oneapi/dnnl/dnnl_sycl.hpp new file mode 120000 index 000000000000..240f3ce94535 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_sycl.hpp @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_sycl.hpp \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_sycl_types.h b/include/mkldnn/oneapi/dnnl/dnnl_sycl_types.h new file mode 120000 index 000000000000..57e21d047c23 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_sycl_types.h @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_sycl_types.h \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_threadpool.h b/include/mkldnn/oneapi/dnnl/dnnl_threadpool.h new file mode 120000 index 000000000000..025a0d37e4a6 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_threadpool.h @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_threadpool.h \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_threadpool.hpp b/include/mkldnn/oneapi/dnnl/dnnl_threadpool.hpp new file mode 120000 index 000000000000..f0d9325da1c8 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_threadpool.hpp @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_threadpool.hpp \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_threadpool_iface.hpp b/include/mkldnn/oneapi/dnnl/dnnl_threadpool_iface.hpp new file mode 120000 index 000000000000..e650ecba6eae --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_threadpool_iface.hpp @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_threadpool_iface.hpp \ No newline at end of file diff --git a/include/mkldnn/oneapi/dnnl/dnnl_types.h b/include/mkldnn/oneapi/dnnl/dnnl_types.h new file mode 120000 index 000000000000..88baa15cb5d5 --- /dev/null +++ b/include/mkldnn/oneapi/dnnl/dnnl_types.h @@ -0,0 +1 @@ +../../../../3rdparty/mkldnn/include/oneapi/dnnl/dnnl_types.h \ No newline at end of file diff --git a/mkldnn.mk b/mkldnn.mk index a22a64a018a8..6f51c8f6a622 100644 --- a/mkldnn.mk +++ b/mkldnn.mk @@ -50,13 +50,13 @@ $(MKLDNN_LIBFILE): cmake $(MKLDNN_SUBMODDIR) $(mkldnn_FLAGS) $(MAKE) -C $(MKLDNN_BUILDDIR) VERBOSE=1 $(MAKE) -C $(MKLDNN_BUILDDIR) install - cp $(MKLDNN_BUILDDIR)/include/dnnl_version.h $(MXNET_INCLDIR)/mkldnn/. - cp $(MKLDNN_BUILDDIR)/include/dnnl_config.h $(MXNET_INCLDIR)/mkldnn/. + cp $(MKLDNN_BUILDDIR)/include/oneapi/dnnl/dnnl_version.h $(MXNET_INCLDIR)/mkldnn/oneapi/dnnl/. + cp $(MKLDNN_BUILDDIR)/include/oneapi/dnnl/dnnl_config.h $(MXNET_INCLDIR)/mkldnn/oneapi/dnnl/. mkldnn_clean: $(RM) -r 3rdparty/mkldnn/build - $(RM) -r include/mkldnn/dnnl_version.h - $(RM) -r include/mkldnn/dnnl_config.h + $(RM) -r include/mkldnn/oneapi/dnnl/dnnl_version.h + $(RM) -r include/mkldnn/oneapi/dnnl/dnnl_config.h ifeq ($(USE_MKLDNN), 1) mkldnn: mkldnn_build