Unverified Commit 4d98e486 authored by Liangsheng Yin's avatar Liangsheng Yin Committed by GitHub
Browse files

Revert "[Misc] feat: Deepgemm update for sgl-kernel (#8790)" to fix kernel CI (#9260)

parent 3d77a318
...@@ -50,17 +50,22 @@ FetchContent_Declare( ...@@ -50,17 +50,22 @@ FetchContent_Declare(
) )
FetchContent_Populate(repo-cutlass) FetchContent_Populate(repo-cutlass)
FetchContent_Declare( # DeepGEMM
repo-fmt if("${CUDA_VERSION}" VERSION_EQUAL "12.8")
GIT_REPOSITORY https://github.com/fmtlib/fmt set(DeepGEMM_REPO "https://github.com/sgl-project/DeepGEMM")
GIT_TAG 553ec11ec06fbe0beebfbb45f9dc3c9eabd83d28 set(DeepGEMM_TAG "blackwell")
GIT_SHALLOW OFF elseif("${CUDA_VERSION}" VERSION_EQUAL "12.9")
) set(DeepGEMM_REPO "https://github.com/sgl-project/DeepGEMM")
FetchContent_Populate(repo-fmt) set(DeepGEMM_TAG "blackwell")
else()
set(DeepGEMM_REPO "https://github.com/deepseek-ai/DeepGEMM")
set(DeepGEMM_TAG "391755ada0ffefa9a6a52b6f14dcaf22d1a463e0")
endif()
FetchContent_Declare( FetchContent_Declare(
repo-deepgemm repo-deepgemm
GIT_REPOSITORY https://github.com/sgl-project/DeepGEMM GIT_REPOSITORY ${DeepGEMM_REPO}
GIT_TAG cabi GIT_TAG ${DeepGEMM_TAG}
GIT_SHALLOW OFF GIT_SHALLOW OFF
) )
FetchContent_Populate(repo-deepgemm) FetchContent_Populate(repo-deepgemm)
...@@ -434,38 +439,13 @@ install(TARGETS spatial_ops LIBRARY DESTINATION sgl_kernel) ...@@ -434,38 +439,13 @@ install(TARGETS spatial_ops LIBRARY DESTINATION sgl_kernel)
set(DEEPGEMM_SOURCES set(DEEPGEMM_SOURCES
"${repo-deepgemm_SOURCE_DIR}/csrc/python_api.cpp" "${repo-deepgemm_SOURCE_DIR}/csrc/python_api.cpp"
) )
# JIT Logic
# DeepGEMM
Python_add_library(deep_gemm_cpp MODULE USE_SABI ${SKBUILD_SABI_VERSION} WITH_SOABI ${DEEPGEMM_SOURCES}) install(DIRECTORY "${repo-deepgemm_SOURCE_DIR}/deep_gemm/"
DESTINATION "deep_gemm"
# Link against necessary libraries, including nvrtc for JIT compilation. PATTERN ".git*" EXCLUDE
target_link_libraries(deep_gemm_cpp PRIVATE ${TORCH_LIBRARIES} c10 cuda nvrtc mscclpp_static) PATTERN "__pycache__" EXCLUDE)
# Add include directories needed by DeepGEMM.
target_include_directories(deep_gemm_cpp PRIVATE
${repo-deepgemm_SOURCE_DIR}/deep_gemm/include
${repo-cutlass_SOURCE_DIR}/include
${repo-fmt_SOURCE_DIR}/include
)
# Apply the same compile options as common_ops.
target_compile_options(deep_gemm_cpp PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:${SGL_KERNEL_CUDA_FLAGS}>)
# Create an empty __init__.py to make `deepgemm` a Python package.
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/deepgemm_pkg_init.py "")
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/deepgemm_pkg_init.py
DESTINATION deep_gemm
RENAME __init__.py
)
# Install the compiled DeepGEMM API library.
install(TARGETS deep_gemm_cpp LIBRARY DESTINATION deep_gemm)
# Install the source files required by DeepGEMM for runtime JIT compilation.
install(
DIRECTORY ${repo-deepgemm_SOURCE_DIR}/deep_gemm/
DESTINATION deep_gemm
)
install(DIRECTORY "${repo-cutlass_SOURCE_DIR}/include/cute/" install(DIRECTORY "${repo-cutlass_SOURCE_DIR}/include/cute/"
DESTINATION "deep_gemm/include/cute") DESTINATION "deep_gemm/include/cute")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment