From 2d38b8aca016a1702eef7e6fbd4c201937abda8a Mon Sep 17 00:00:00 2001 From: Baizhou Zhang Date: Wed, 11 Feb 2026 01:17:40 +0800 Subject: [PATCH] Revert "[sgl-kernel] upgrade deepgemm" (#18562) --- sgl-kernel/CMakeLists.txt | 17 +++-------------- sgl-kernel/build.sh | 2 -- sgl-kernel/csrc/elementwise/concat_mla.cu | 1 - 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/sgl-kernel/CMakeLists.txt b/sgl-kernel/CMakeLists.txt index 880428161..0c8d17802 100644 --- a/sgl-kernel/CMakeLists.txt +++ b/sgl-kernel/CMakeLists.txt @@ -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 diff --git a/sgl-kernel/build.sh b/sgl-kernel/build.sh index d8ad84965..b29d4d64a 100755 --- a/sgl-kernel/build.sh +++ b/sgl-kernel/build.sh @@ -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 \ diff --git a/sgl-kernel/csrc/elementwise/concat_mla.cu b/sgl-kernel/csrc/elementwise/concat_mla.cu index 32144aa8a..7d5b8595c 100644 --- a/sgl-kernel/csrc/elementwise/concat_mla.cu +++ b/sgl-kernel/csrc/elementwise/concat_mla.cu @@ -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