kpuatamazon commented on a change in pull request #17559:
URL: https://github.com/apache/incubator-mxnet/pull/17559#discussion_r479501831



##########
File path: CMakeLists.txt
##########
@@ -278,6 +283,25 @@ if(USE_MKLDNN)
   set_target_properties(dnnl PROPERTIES CXX_CLANG_TIDY "")  # don't lint 
3rdparty dependency
 endif()
 
+if(USE_INTGEMM)
+  message(STATUS "Using intgemm")
+  include(FetchContent)
+  FetchContent_Declare(
+    intgemm
+    GIT_REPOSITORY https://github.com/kpu/intgemm.git
+    GIT_TAG        0f05c3ebd037eacdf8cff165736fea2b0d125023
+  )
+  FetchContent_GetProperties(intgemm)
+  if(NOT intgemm_POPULATED)
+    FetchContent_Populate(intgemm)
+    add_subdirectory(${intgemm_SOURCE_DIR} ${intgemm_BINARY_DIR} 
EXCLUDE_FROM_ALL)
+  endif()
+  include_directories(${intgemm_SOURCE_DIR})
+  #intgemm generates a config header based on AVX512 support in the compiler.
+  include_directories(${intgemm_BINARY_DIR})

Review comment:
       > Currently you're hardcoding the `#include 
"../../../../3rdparty/intgemm/intgemm.h"` path inside the MXNet source files.
   This is common practice:
   
https://github.com/apache/incubator-mxnet/blob/a9ca6600384265fcf25ce2993019f9542540fda1/src/common/tensor_inspector.h#L35
   
https://github.com/apache/incubator-mxnet/blob/a9ca6600384265fcf25ce2993019f9542540fda1/src/operator/nn/ctc_loss.cc#L25
   
https://github.com/apache/incubator-mxnet/blob/a9ca6600384265fcf25ce2993019f9542540fda1/src/operator/nn/ctc_loss.cu#L27
   
   > Essentially you need to update the intgemm cmakelists file to ensure it 
encapsulates the headers as part of the intgemm target. 
   
   Were I to do that, it would unnecessarily pollute the include paths of 
software that references the file by its path in the source/submodule tree.  




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