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
b4403985
Unverified
Commit
b4403985
authored
Dec 31, 2024
by
Ke Bao
Committed by
GitHub
Dec 31, 2024
Browse files
Add cutlass submodule for sgl-kernel (#2676)
parent
339c69a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
0 deletions
+14
-0
.gitmodules
.gitmodules
+3
-0
sgl-kernel/3rdparty/cutlass
sgl-kernel/3rdparty/cutlass
+1
-0
sgl-kernel/CMakeLists.txt
sgl-kernel/CMakeLists.txt
+4
-0
sgl-kernel/setup.py
sgl-kernel/setup.py
+6
-0
No files found.
.gitmodules
View file @
b4403985
[submodule "sgl-kernel/3rdparty/cutlass"]
path = sgl-kernel/3rdparty/cutlass
url = https://github.com/NVIDIA/cutlass.git
cutlass
@
bf9da7b7
Subproject commit bf9da7b76c766d7ee7d536afc77880a4ef1f1156
sgl-kernel/CMakeLists.txt
View file @
b4403985
...
...
@@ -8,6 +8,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set
(
CMAKE_CUDA_STANDARD 17
)
set
(
CMAKE_CUDA_STANDARD_REQUIRED ON
)
set
(
CUTLASS_DIR
"3rdparty/cutlass"
)
# Set CUDA architectures
set
(
CMAKE_CUDA_ARCHITECTURES
"75;80;86;89;90"
)
message
(
STATUS
"Building for CUDA architectures:
${
CMAKE_CUDA_ARCHITECTURES
}
"
)
...
...
@@ -38,6 +40,8 @@ target_include_directories(_kernels
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/sgl-kernel/csrc
${
CUDA_INCLUDE_DIRS
}
${
TORCH_INCLUDE_DIRS
}
${
CUTLASS_DIR
}
/include
${
CUTLASS_DIR
}
/tools/util/include
)
target_link_libraries
(
_kernels
...
...
sgl-kernel/setup.py
View file @
b4403985
...
...
@@ -58,6 +58,11 @@ def update_wheel_platform_tag():
old_wheel
.
rename
(
new_wheel
)
cutlass
=
root
/
"3rdparty"
/
"cutlass"
include_dirs
=
[
cutlass
.
resolve
()
/
"include"
,
cutlass
.
resolve
()
/
"tools"
/
"util"
/
"include"
,
]
nvcc_flags
=
[
"-O3"
,
"-Xcompiler"
,
...
...
@@ -82,6 +87,7 @@ ext_modules = [
"src/sgl-kernel/csrc/moe_align_kernel.cu"
,
"src/sgl-kernel/csrc/sgl_kernel_ops.cu"
,
],
include_dirs
=
include_dirs
,
extra_compile_args
=
{
"nvcc"
:
nvcc_flags
,
"cxx"
:
cxx_flags
,
...
...
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