You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mkl_dnn.cmake 861 B

5 years ago
12345678910111213141516171819202122
  1. set(onednn_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2")
  2. set(onednn_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
  3. if (CMAKE_SYSTEM_NAME MATCHES "Windows")
  4. mindspore_add_pkg(onednn
  5. VER 1.1.1
  6. LIBS dnnl mkldnn
  7. HEAD_ONLY ./include
  8. RELEASE on
  9. URL https://github.com/oneapi-src/oneDNN/releases/download/v1.1.1/dnnl_win_1.1.1_cpu_vcomp.zip
  10. MD5 ecaab9ed549643067699c80e5cea1c23)
  11. else()
  12. mindspore_add_pkg(onednn
  13. VER 1.1.2
  14. LIBS dnnl mkldnn
  15. URL https://github.com/oneapi-src/oneDNN/archive/v1.1.2.tar.gz
  16. MD5 ab40d52230f3ad1d7a6f06ce0f6bc17a
  17. CMAKE_OPTION -DDNNL_ARCH_OPT_FLAGS='' -DDNNL_CPU_RUNTIME='SEQ' -DDNNL_BUILD_EXAMPLES=OFF -DDNNL_BUILD_TESTS=OFF)
  18. endif()
  19. include_directories(${onednn_INC})
  20. add_library(mindspore::dnnl ALIAS onednn::dnnl)
  21. add_library(mindspore::mkldnn ALIAS onednn::mkldnn)