Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,32 @@ if(VLLM_GPU_LANG STREQUAL "HIP")
USE_SABI 3
WITH_SOABI)

#
# _rocm_sparse_mla_C extension (gfx950 only)
#
list(FIND VLLM_GPU_ARCHES "gfx950" _gfx950_idx)
if(NOT _gfx950_idx EQUAL -1)
set(VLLM_ROCM_SPARSE_MLA_SRC
"csrc/rocm/sparse_mla_decode.cu")

set(VLLM_ROCM_SPARSE_MLA_FLAGS ${VLLM_GPU_FLAGS}
"-Wno-c++11-narrowing")

define_extension_target(
_rocm_sparse_mla_C

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should compile it into _rocm_C as well. Your code will need to be guarded by GPU ARCH macros.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, i removed the extension and added the source into _rocm_C (for gfx950 only)

DESTINATION vllm
LANGUAGE ${VLLM_GPU_LANG}
SOURCES ${VLLM_ROCM_SPARSE_MLA_SRC}
COMPILE_FLAGS ${VLLM_ROCM_SPARSE_MLA_FLAGS}
ARCHITECTURES "gfx950"
USE_SABI 3
WITH_SOABI)

message(STATUS "Building ROCm sparse MLA decode kernel for gfx950.")
else()
message(STATUS "Not building ROCm sparse MLA decode kernel (gfx950 not in target architectures).")
endif()

if(VLLM_ROCM_HAS_GFX1100)
target_compile_definitions(_rocm_C PRIVATE VLLM_ROCM_GFX1100)
endif()
Expand Down
Loading
Loading