leezu commented on a change in pull request #17559:
URL: https://github.com/apache/incubator-mxnet/pull/17559#discussion_r479410149
##########
File path: CMakeLists.txt
##########
@@ -474,6 +490,13 @@ endif()
FILE(GLOB_RECURSE SOURCE "src/*.cc" "src/*.h" "include/*.h")
FILE(GLOB_RECURSE CUDA "src/*.cu" "src/*.cuh")
+if (USE_INTGEMM)
+ list(APPEND SOURCE "3rdparty/intgemm/intgemm.cc")
+else()
+ FILE(GLOB_RECURSE INTGEMM_OPERATOR_SOURCE
"src/operator/contrib/intgemm/*.cc" "src/operator/contrib/intgemm/*.h")
+ list(REMOVE_ITEM SOURCE ${INTGEMM_OPERATOR_SOURCE})
+endif()
Review comment:
Sorry for being unclear in the previous comment. What I mean is, that if
you use `add_subdirectory`, there is no need for adding
`INTGEMM_OPERATOR_SOURCE` manually to the list of source files of the mxnet
library. Instead the `CMakeLists.txt` should declare a target, which
encapsulates the set of source and header files (and triggers the compilation
tests). Then, in the mxnet CMakeLists.txt you only need `add_subdirectory` and
`target_link_libraries(mxnet PRIVATE intgemm)`
----------------------------------------------------------------
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]