Signed-off-by: Lucas Wilkinson <lwilkinson@neuralmagic.com>
This commit is contained in:
Lucas Wilkinson 2025-05-15 05:47:08 +00:00
parent 4e00778a60
commit 7ebe64f94b
2 changed files with 6 additions and 3 deletions

View File

@ -483,6 +483,10 @@ set(VLLM_MOE_EXT_SRC
"csrc/moe/moe_align_sum_kernels.cu"
"csrc/moe/topk_softmax_kernels.cu")
if(VLLM_GPU_LANG STREQUAL "CUDA")
list(APPEND VLLM_MOE_EXT_SRC "csrc/moe/moe_wna16.cu")
endif()
# Apply gencode flags to base MOE extension sources
set_gencode_flags_for_srcs(
SRCS "${VLLM_MOE_EXT_SRC}"
@ -495,7 +499,6 @@ if(VLLM_GPU_LANG STREQUAL "CUDA")
ARCHS "8.0;9.0+PTX"
GEN_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/csrc/moe/marlin_moe_wna16/generate_kernels.py"
GEN_GLOB "csrc/moe/marlin_moe_wna16/*.cu"
SRCS "csrc/moe/moe_wna16.cu"
OUT_SRCS_VAR VLLM_MOE_EXT_SRC
)
endif()

View File

@ -140,8 +140,8 @@ macro(optional_cuda_sources)
if(NOT OCS_ARCHS)
message(FATAL_ERROR "optional_cuda_sources ${OCS_NAME}: ARCHS is required")
endif()
if(NOT OCS_SRCS)
message(FATAL_ERROR "optional_cuda_sources ${OCS_NAME}: SRCS is required")
if(NOT OCS_SRCS AND NOT OCS_GEN_SCRIPT)
message(FATAL_ERROR "optional_cuda_sources ${OCS_NAME}: either SRCS or GEN_SCRIPT must be provided")
endif()
if(NOT OCS_MIN_VERSION)
set(OCS_MIN_VERSION "0.0")