Add cutlass submodule for sgl-kernel (#2676)
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -0,0 +1,3 @@
|
||||
[submodule "sgl-kernel/3rdparty/cutlass"]
|
||||
path = sgl-kernel/3rdparty/cutlass
|
||||
url = https://github.com/NVIDIA/cutlass.git
|
||||
|
||||
1
sgl-kernel/3rdparty/cutlass
vendored
Submodule
1
sgl-kernel/3rdparty/cutlass
vendored
Submodule
Submodule sgl-kernel/3rdparty/cutlass added at bf9da7b76c
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user