TaoLv commented on a change in pull request #15706: [mkldnn-v1.0] Initiate the 
transition to MKL-DNN v1.0
URL: https://github.com/apache/incubator-mxnet/pull/15706#discussion_r311613093
 
 

 ##########
 File path: CMakeLists.txt
 ##########
 @@ -247,26 +246,23 @@ if(ENABLE_TESTCOVERAGE)
 endif()
 
 if(USE_MKLDNN)
-  include(cmake/DownloadMKLML.cmake)
   # CPU architecture (e.g., C5) can't run on another architecture (e.g., g3).
-  if(NOT MSVC)
-    set(ARCH_OPT_FLAGS "-mtune=generic")
-  else()
+  if(MSVC)
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /EHsc")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHsc /Gy")
   endif()
 
-  set(WITH_TEST OFF CACHE INTERNAL "" FORCE)
-  set(WITH_EXAMPLE OFF CACHE INTERNAL "" FORCE)
-  set(ARCH_OPT_FLAGS "" CACHE INTERNAL "" FORCE)
+  set(MKLDNN_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
+  set(MKLDNN_BUILD_EXAMPLES OFF CACHE INTERNAL "" FORCE)
+  set(MKLDNN_ARCH_OPT_FLAGS "" CACHE INTERNAL "" FORCE)
+  set(MKLDNN_USE_MKL NONE CACHE INTERNAL "" FORCE)
+  set(MKLDNN_ENABLE_JIT_PROFILING OFF CACHE INTERNAL "" FORCE)
 
   add_subdirectory(3rdparty/mkldnn)
 
   include_directories(3rdparty/mkldnn/include)
   include_directories(${PROJECT_BINARY_DIR}/3rdparty/mkldnn/include)
-  add_definitions(-DUSE_MKL=1)
-  add_definitions(-DCUB_MKL=1)
-  add_definitions(-DMXNET_USE_MKLDNN=1)
+  add_definitions(-DMXNET_USE_MKLDNN=100)
 
 Review comment:
   I simply take it as v1.0.0 of MKL-DNN. But actually this PR upgrades MKL-DNN 
dependency to the 1.0.1 patch release.
   Anyway, by changing this, I want to skip the compilation of those code 
wrapped with `#if MXNET_USE_MKLDNN == 1` in the current code base as they are 
not compatible with the new MKL-DNN. Once a piece of the code (eg. the 
implementation of an operator) is changed to MKL-DNN 1.0 compatible, the PR 
author can change the check to `#if MXNET_USE_MKLDNN == 100` to make the new 
code can compile and link with the new MKL-DNN. That will happen incrementally.
   Hope I make it clear for you.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to