2020-04-07 11:22:53 +08:00
|
|
|
set(onednn_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2")
|
|
|
|
set(onednn_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
|
2020-04-15 17:36:48 +08:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
|
|
|
mindspore_add_pkg(onednn
|
2020-08-04 21:41:07 +08:00
|
|
|
VER 1.5
|
2020-04-15 17:36:48 +08:00
|
|
|
LIBS dnnl mkldnn
|
2020-04-26 20:51:18 +08:00
|
|
|
HEAD_ONLY ./include
|
2020-04-15 17:36:48 +08:00
|
|
|
RELEASE on
|
2020-08-04 21:41:07 +08:00
|
|
|
URL https://github.com/oneapi-src/oneDNN/releases/download/v1.5/dnnl_win_1.5.0_cpu_vcomp.zip
|
|
|
|
MD5 17757c84f49edd42d34ae8c9288110a1)
|
2020-04-15 17:36:48 +08:00
|
|
|
else()
|
2020-10-14 19:35:13 +08:00
|
|
|
if (ENABLE_GITEE)
|
|
|
|
set(REQ_URL "https://gitee.com/mirrors/MKL-DNN/repository/archive/v1.5.tar.gz")
|
|
|
|
set(MD5 "5e0f3800d484969d420188e9cff7348c")
|
|
|
|
else()
|
|
|
|
set(REQ_URL "https://github.com/oneapi-src/oneDNN/archive/v1.5.tar.gz")
|
|
|
|
set(MD5 "5d97e0e8f4c0b37da5f524533b7a644b")
|
|
|
|
endif ()
|
2020-04-15 17:36:48 +08:00
|
|
|
mindspore_add_pkg(onednn
|
2020-08-04 21:41:07 +08:00
|
|
|
VER 1.5
|
2020-03-27 14:49:12 +08:00
|
|
|
LIBS dnnl mkldnn
|
2020-10-14 19:35:13 +08:00
|
|
|
URL ${REQ_URL}
|
|
|
|
MD5 ${MD5}
|
2020-03-27 14:49:12 +08:00
|
|
|
CMAKE_OPTION -DDNNL_ARCH_OPT_FLAGS='' -DDNNL_CPU_RUNTIME='SEQ' -DDNNL_BUILD_EXAMPLES=OFF -DDNNL_BUILD_TESTS=OFF)
|
2020-04-15 17:36:48 +08:00
|
|
|
endif()
|
|
|
|
|
2020-04-07 11:22:53 +08:00
|
|
|
include_directories(${onednn_INC})
|
|
|
|
add_library(mindspore::dnnl ALIAS onednn::dnnl)
|
|
|
|
add_library(mindspore::mkldnn ALIAS onednn::mkldnn)
|