"vllm/vscode:/vscode.git/clone" did not exist on "aa7012eb6db69baab57c80ac596d088eb81e090f"
Unverified Commit 6c9837a7 authored by Huy Do's avatar Huy Do Committed by GitHub
Browse files

Fix cuda_archs_loose_intersection when handling sm_*a (#20207)


Signed-off-by: default avatarHuy Do <huydhn@gmail.com>
parent 6f2f53a8
...@@ -562,7 +562,7 @@ if(VLLM_GPU_LANG STREQUAL "CUDA") ...@@ -562,7 +562,7 @@ if(VLLM_GPU_LANG STREQUAL "CUDA")
"if you intend on running FP8 quantized MoE models on Hopper.") "if you intend on running FP8 quantized MoE models on Hopper.")
else() else()
message(STATUS "Not building grouped_mm_c3x as no compatible archs found " message(STATUS "Not building grouped_mm_c3x as no compatible archs found "
"in CUDA target architectures") "in CUDA target architectures.")
endif() endif()
endif() endif()
...@@ -574,6 +574,16 @@ if(VLLM_GPU_LANG STREQUAL "CUDA") ...@@ -574,6 +574,16 @@ if(VLLM_GPU_LANG STREQUAL "CUDA")
SRCS "${SRCS}" SRCS "${SRCS}"
CUDA_ARCHS "${CUTLASS_MOE_DATA_ARCHS}") CUDA_ARCHS "${CUTLASS_MOE_DATA_ARCHS}")
list(APPEND VLLM_EXT_SRC "${SRCS}") list(APPEND VLLM_EXT_SRC "${SRCS}")
message(STATUS "Building moe_data for archs: ${CUTLASS_MOE_DATA_ARCHS}")
else()
if (NOT ${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.3 AND CUTLASS_MOE_DATA_ARCHS)
message(STATUS "Not building moe_data as CUDA Compiler version is "
"not >= 12.3, we recommend upgrading to CUDA 12.3 or later "
"if you intend on running FP8 quantized MoE models on Hopper or Blackwell.")
else()
message(STATUS "Not building moe_data as no compatible archs found "
"in CUDA target architectures.")
endif()
endif() endif()
# #
......
...@@ -313,21 +313,16 @@ function(cuda_archs_loose_intersection OUT_CUDA_ARCHS SRC_CUDA_ARCHS TGT_CUDA_AR ...@@ -313,21 +313,16 @@ function(cuda_archs_loose_intersection OUT_CUDA_ARCHS SRC_CUDA_ARCHS TGT_CUDA_AR
# if x.0a is in SRC_CUDA_ARCHS and x.0 is in CUDA_ARCHS then we should # if x.0a is in SRC_CUDA_ARCHS and x.0 is in CUDA_ARCHS then we should
# remove x.0a from SRC_CUDA_ARCHS and add x.0a to _CUDA_ARCHS # remove x.0a from SRC_CUDA_ARCHS and add x.0a to _CUDA_ARCHS
set(_CUDA_ARCHS) set(_CUDA_ARCHS)
if ("9.0a" IN_LIST _SRC_CUDA_ARCHS) foreach(_arch ${_SRC_CUDA_ARCHS})
list(REMOVE_ITEM _SRC_CUDA_ARCHS "9.0a") if(_arch MATCHES "\\a$")
if ("9.0" IN_LIST TGT_CUDA_ARCHS) list(REMOVE_ITEM _SRC_CUDA_ARCHS "${_arch}")
list(REMOVE_ITEM _TGT_CUDA_ARCHS "9.0") string(REPLACE "a" "" _base "${_arch}")
set(_CUDA_ARCHS "9.0a") if ("${_base}" IN_LIST TGT_CUDA_ARCHS)
endif() list(REMOVE_ITEM _TGT_CUDA_ARCHS "${_base}")
endif() list(APPEND _CUDA_ARCHS "${_arch}")
if ("10.0a" IN_LIST _SRC_CUDA_ARCHS)
list(REMOVE_ITEM _SRC_CUDA_ARCHS "10.0a")
if ("10.0" IN_LIST TGT_CUDA_ARCHS)
list(REMOVE_ITEM _TGT_CUDA_ARCHS "10.0")
set(_CUDA_ARCHS "10.0a")
endif() endif()
endif() endif()
endforeach()
list(SORT _SRC_CUDA_ARCHS COMPARE NATURAL ORDER ASCENDING) list(SORT _SRC_CUDA_ARCHS COMPARE NATURAL ORDER ASCENDING)
......
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