Revert "[sgl-kernel] upgrade deepgemm" (#18562)

This commit is contained in:
Baizhou Zhang
2026-02-11 01:17:40 +08:00
committed by GitHub
parent 573ff55814
commit 2d38b8aca0
3 changed files with 3 additions and 17 deletions

View File

@@ -56,7 +56,7 @@ FetchContent_Populate(repo-cutlass)
FetchContent_Declare(
repo-deepgemm
GIT_REPOSITORY https://github.com/sgl-project/DeepGEMM
GIT_TAG fc08e5775a5db960690a41248655168c55bef228
GIT_TAG ffe2b6b97420a9f8c58268ca55755168e6e2f360
GIT_SHALLOW OFF
)
FetchContent_Populate(repo-deepgemm)
@@ -548,21 +548,10 @@ set(DEEPGEMM_SOURCES
"${repo-deepgemm_SOURCE_DIR}/csrc/python_api.cpp"
)
Python_add_library(deep_gemm_cpp MODULE WITH_SOABI ${DEEPGEMM_SOURCES})
# DeepGEMM's Python package (`deep_gemm/__init__.py`) expects the extension module name to be `_C`,
# i.e. it does `from . import _C`. Make sure the built module is importable as `deep_gemm._C`.
set_target_properties(deep_gemm_cpp PROPERTIES
OUTPUT_NAME "_C"
PREFIX ""
)
Python_add_library(deep_gemm_cpp MODULE USE_SABI ${SKBUILD_SABI_VERSION} WITH_SOABI ${DEEPGEMM_SOURCES})
# Link against necessary libraries, including nvrtc for JIT compilation.
find_library(TORCH_PYTHON_LIB
NAMES torch_python
PATHS "${TORCH_INSTALL_PREFIX}/lib" "${TORCH_INSTALL_PREFIX}/lib64"
)
target_link_libraries(deep_gemm_cpp PRIVATE ${TORCH_LIBRARIES} "${TORCH_PYTHON_LIB}" c10 cuda nvrtc mscclpp_static)
target_link_libraries(deep_gemm_cpp PRIVATE ${TORCH_LIBRARIES} c10 cuda nvrtc mscclpp_static)
# Add include directories needed by DeepGEMM.
target_include_directories(deep_gemm_cpp PRIVATE

View File

@@ -46,7 +46,6 @@ echo "PYTHON_TAG: ${PY_TAG}"
echo "Output: ${DIST_DIR}/"
echo "Buildx cache: ${BUILDX_CACHE_DIR}"
echo "Builder: ${BUILDER_NAME}"
echo "USE_CCACHE: ${USE_CCACHE}"
echo "----------------------------------------"
# Optional profiling build-args (empty string disables)
@@ -62,7 +61,6 @@ docker buildx build \
--build-arg ARCH="${ARCH}" \
--build-arg PYTHON_VERSION="${PYTHON_VERSION}" \
--build-arg PYTHON_TAG="${PY_TAG}" \
--build-arg USE_CCACHE="${USE_CCACHE}" \
"${BUILD_ARGS[@]}" \
--cache-from type=local,src=${BUILDX_CACHE_DIR} \
--cache-to type=local,dest=${BUILDX_CACHE_DIR},mode=max \

View File

@@ -215,4 +215,3 @@ void concat_mla_absorb_q(at::Tensor a, at::Tensor b, at::Tensor out) {
cudaError_t err = cudaGetLastError();
TORCH_CHECK(err == cudaSuccess, "CUDA kernel launch failed: ", cudaGetErrorString(err));
}
// For ci build