[Feat] support deepgemm for cmake (#4864)
This commit is contained in:
@@ -5,7 +5,7 @@ project(sgl-kernel LANGUAGES CXX CUDA)
|
||||
# FetchContent_MakeAvailable will build it.
|
||||
cmake_policy(SET CMP0169 OLD)
|
||||
|
||||
find_package(Python COMPONENTS Interpreter Development.Module Development.SABIModule REQUIRED)
|
||||
find_package(Python COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT} REQUIRED)
|
||||
|
||||
enable_language(CUDA)
|
||||
find_package(CUDAToolkit REQUIRED)
|
||||
@@ -155,7 +155,7 @@ set(SOURCES
|
||||
)
|
||||
|
||||
# Support abi3 for build
|
||||
Python_add_library(common_ops MODULE USE_SABI 3.9 WITH_SOABI ${SOURCES})
|
||||
Python_add_library(common_ops MODULE USE_SABI ${SKBUILD_SABI_VERSION} WITH_SOABI ${SOURCES})
|
||||
|
||||
target_compile_options(common_ops PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:${SGL_KERNEL_CUDA_FLAGS}>)
|
||||
|
||||
@@ -164,3 +164,17 @@ target_include_directories(common_ops PRIVATE ${TORCH_INCLUDE_DIRS})
|
||||
target_link_libraries(common_ops PRIVATE ${TORCH_LIBRARIES} c10 cuda cublas cublasLt)
|
||||
|
||||
install(TARGETS common_ops LIBRARY DESTINATION "sgl_kernel")
|
||||
|
||||
# JIT Logic
|
||||
# DeepGEMM
|
||||
|
||||
install(DIRECTORY "${repo-deepgemm_SOURCE_DIR}/deep_gemm/"
|
||||
DESTINATION "deep_gemm"
|
||||
PATTERN ".git*" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE)
|
||||
|
||||
install(DIRECTORY "${repo-cutlass_SOURCE_DIR}/include/cute/"
|
||||
DESTINATION "deep_gemm/include/cute")
|
||||
|
||||
install(DIRECTORY "${repo-cutlass_SOURCE_DIR}/include/cutlass/"
|
||||
DESTINATION "deep_gemm/include/cutlass")
|
||||
|
||||
Reference in New Issue
Block a user