leezu commented on a change in pull request #18355:
URL: https://github.com/apache/incubator-mxnet/pull/18355#discussion_r427018415



##########
File path: CMakeLists.txt
##########
@@ -240,24 +240,26 @@ if(USE_MKLDNN)
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHsc /Gy /MT")
   endif()
 
-  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_ENABLE_JIT_PROFILING OFF CACHE INTERNAL "" FORCE)
-  set(MKLDNN_LIBRARY_TYPE STATIC CACHE INTERNAL "" FORCE)
-  set(DNNL_ENABLE_CONCURRENT_EXEC ON CACHE INTERNAL "" FORCE)
-
-  if(NOT USE_OPENMP)
+  function(load_mkldnn)

Review comment:
       Functions have their own scope in cmake. We don't want to change any of 
the settings outside of this function (such as the install target name for the 
include files)




----------------------------------------------------------------
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]


Reply via email to