Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
4db29e82
Unverified
Commit
4db29e82
authored
Mar 29, 2025
by
yinfan98
Committed by
GitHub
Mar 28, 2025
Browse files
[Feat] support deepgemm for cmake (#4864)
parent
c483377e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
sgl-kernel/CMakeLists.txt
sgl-kernel/CMakeLists.txt
+16
-2
No files found.
sgl-kernel/CMakeLists.txt
View file @
4db29e82
...
@@ -5,7 +5,7 @@ project(sgl-kernel LANGUAGES CXX CUDA)
...
@@ -5,7 +5,7 @@ project(sgl-kernel LANGUAGES CXX CUDA)
# FetchContent_MakeAvailable will build it.
# FetchContent_MakeAvailable will build it.
cmake_policy
(
SET CMP0169 OLD
)
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
)
enable_language
(
CUDA
)
find_package
(
CUDAToolkit REQUIRED
)
find_package
(
CUDAToolkit REQUIRED
)
...
@@ -155,7 +155,7 @@ set(SOURCES
...
@@ -155,7 +155,7 @@ set(SOURCES
)
)
# Support abi3 for build
# 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
}
>
)
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})
...
@@ -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
)
target_link_libraries
(
common_ops PRIVATE
${
TORCH_LIBRARIES
}
c10 cuda cublas cublasLt
)
install
(
TARGETS common_ops LIBRARY DESTINATION
"sgl_kernel"
)
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"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment