You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2019/11/13 01:39:54 UTC

[GitHub] [incubator-tvm] TaoLv commented on a change in pull request #4323: [Contrib] Add MKL DNN option

TaoLv commented on a change in pull request #4323: [Contrib] Add MKL DNN option
URL: https://github.com/apache/incubator-tvm/pull/4323#discussion_r345533163
 
 

 ##########
 File path: cmake/modules/contrib/BLAS.cmake
 ##########
 @@ -55,3 +55,11 @@ elseif(USE_BLAS STREQUAL "none")
 else()
   message(FATAL_ERROR "Invalid option: USE_BLAS=" ${USE_BLAS})
 endif()
+
+if(USE_MKL_DNN STREQUAL "ON")
+  find_library(BLAS_LIBRARY_MKLDNN dnnl)
+  list(APPEND TVM_RUNTIME_LINKER_LIBS ${BLAS_LIBRARY_MKLDNN})
+  list(APPEND RUNTIME_SRCS ${CBLAS_CONTRIB_SRC})
+  add_definitions(-DUSE_MKL_DNN=1)
+  message(STATUS "Use MKL DNN library " ${BLAS_LIBRARY_MKLDNN})
+endif()
 
 Review comment:
   What's the strategy if both `USE_BLAS` AND `USE_MKL_DNN` are set?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services