"vscode:/vscode.git/clone" did not exist on "3d8377062c82cca2bf9f8591ba16f000c1e84e9e"
Unverified Commit b4403985 authored by Ke Bao's avatar Ke Bao Committed by GitHub
Browse files

Add cutlass submodule for sgl-kernel (#2676)

parent 339c69a2
[submodule "sgl-kernel/3rdparty/cutlass"]
path = sgl-kernel/3rdparty/cutlass
url = https://github.com/NVIDIA/cutlass.git
Subproject commit bf9da7b76c766d7ee7d536afc77880a4ef1f1156
...@@ -8,6 +8,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) ...@@ -8,6 +8,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_STANDARD 17) set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON) set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(CUTLASS_DIR "3rdparty/cutlass")
# Set CUDA architectures # Set CUDA architectures
set(CMAKE_CUDA_ARCHITECTURES "75;80;86;89;90") set(CMAKE_CUDA_ARCHITECTURES "75;80;86;89;90")
message(STATUS "Building for CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}") message(STATUS "Building for CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
...@@ -38,6 +40,8 @@ target_include_directories(_kernels ...@@ -38,6 +40,8 @@ target_include_directories(_kernels
${CMAKE_CURRENT_SOURCE_DIR}/src/sgl-kernel/csrc ${CMAKE_CURRENT_SOURCE_DIR}/src/sgl-kernel/csrc
${CUDA_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS}
${TORCH_INCLUDE_DIRS} ${TORCH_INCLUDE_DIRS}
${CUTLASS_DIR}/include
${CUTLASS_DIR}/tools/util/include
) )
target_link_libraries(_kernels target_link_libraries(_kernels
......
...@@ -58,6 +58,11 @@ def update_wheel_platform_tag(): ...@@ -58,6 +58,11 @@ def update_wheel_platform_tag():
old_wheel.rename(new_wheel) old_wheel.rename(new_wheel)
cutlass = root / "3rdparty" / "cutlass"
include_dirs = [
cutlass.resolve() / "include",
cutlass.resolve() / "tools" / "util" / "include",
]
nvcc_flags = [ nvcc_flags = [
"-O3", "-O3",
"-Xcompiler", "-Xcompiler",
...@@ -82,6 +87,7 @@ ext_modules = [ ...@@ -82,6 +87,7 @@ ext_modules = [
"src/sgl-kernel/csrc/moe_align_kernel.cu", "src/sgl-kernel/csrc/moe_align_kernel.cu",
"src/sgl-kernel/csrc/sgl_kernel_ops.cu", "src/sgl-kernel/csrc/sgl_kernel_ops.cu",
], ],
include_dirs=include_dirs,
extra_compile_args={ extra_compile_args={
"nvcc": nvcc_flags, "nvcc": nvcc_flags,
"cxx": cxx_flags, "cxx": cxx_flags,
......
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