vinx13 commented on code in PR #16638:
URL: https://github.com/apache/tvm/pull/16638#discussion_r1501040388
##########
CMakeLists.txt:
##########
@@ -594,26 +595,44 @@ add_library(tvm_libinfo_objs OBJECT ${LIBINFO_FILE})
include(GNUInstallDirs)
if(NOT BUILD_DUMMY_LIBTVM)
- add_library(tvm SHARED $<TARGET_OBJECTS:tvm_objs>
$<TARGET_OBJECTS:tvm_runtime_objs> $<TARGET_OBJECTS:tvm_libinfo_objs>)
+ add_library(tvm SHARED
+ $<TARGET_OBJECTS:tvm_objs>
+ $<TARGET_OBJECTS:tvm_runtime_objs>
+ $<TARGET_OBJECTS:tvm_libinfo_objs>
+ ${CUTLASS_RUNTIME_OBJS}
Review Comment:
use `TVM_RUNTIME_EXT_OBJS`
##########
cmake/modules/contrib/CUTLASS.cmake:
##########
@@ -16,16 +16,61 @@
# under the License.
if(USE_CUDA AND USE_CUTLASS)
- tvm_file_glob(GLOB CUTLASS_CONTRIB_SRC
src/relay/backend/contrib/cutlass/*.cc src/relax/backend/contrib/cutlass/*.cc)
+ set(CUTLASS_GEN_COND "$<AND:$<BOOL:${USE_CUDA}>,$<BOOL:${USE_CUTLASS}>>")
+ set(CUTLASS_RUNTIME_OBJS "")
+
+ tvm_file_glob(GLOB CUTLASS_CONTRIB_SRC
+ src/relay/backend/contrib/cutlass/*.cc
+ src/relax/backend/contrib/cutlass/*.cc
+ )
list(APPEND COMPILER_SRCS ${CUTLASS_CONTRIB_SRC})
set(FPA_INTB_GEMM_TVM_BINDING ON)
set(FPA_INTB_GEMM_TVM_HOME ${PROJECT_SOURCE_DIR})
- set(CUTLASS_DIR ${PROJECT_SOURCE_DIR}/3rdparty/cutlass)
+ ### Build cutlass runtime objects for fpA_intB_gemm using its cutlass
submodule
add_subdirectory(${PROJECT_SOURCE_DIR}/3rdparty/cutlass_fpA_intB_gemm)
+ target_include_directories(fpA_intB_gemm PRIVATE
+ ${PROJECT_SOURCE_DIR}/3rdparty/cutlass_fpA_intB_gemm
+ ${PROJECT_SOURCE_DIR}/3rdparty/cutlass_fpA_intB_gemm/cutlass/include
+ )
+ set(CUTLASS_FPA_INTB_RUNTIME_SRCS "")
+ list(APPEND CUTLASS_FPA_INTB_RUNTIME_SRCS
src/runtime/contrib/cutlass/moe_gemm.cc)
Review Comment:
Is it needed? It’s already included in the submodule
https://github.com/tlc-pack/cutlass_fpA_intB_gemm/blob/main/cutlass_kernels/CMakeLists.txt
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]