@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 3e6dd40016
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Bugfix] fix cuda 12.6 and 11.8 build (#22952)

Signed-off-by: Jinzhen Lin <jinzhen.ljz@antgroup.com>

Jinzhen Lin committed Aug 15, 2025 at 18:10 UTC 3e6dd400160525b71b19e3f94b0066b1bea7bb97
1 file changed +12 -6
CMakeLists.txt
+12 -6
@@ -351,8 +351,10 @@ if(VLLM_GPU_LANG STREQUAL "CUDA")
351 set_gencode_flags_for_srcs(
352 SRCS "${MARLIN_TEMPLATE_KERNEL_SRC}"
353 CUDA_ARCHS "${MARLIN_ARCHS}")
354 - set_source_files_properties(${MARLIN_TEMPLATE_KERNEL_SRC}
355 - PROPERTIES COMPILE_FLAGS "-static-global-template-stub=false")
354 + if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.8)
355 + set_source_files_properties(${MARLIN_TEMPLATE_KERNEL_SRC}
356 + PROPERTIES COMPILE_FLAGS "-static-global-template-stub=false")
357 + endif()
358
359 list(APPEND VLLM_EXT_SRC ${MARLIN_TEMPLATE_KERNEL_SRC})
360
@@ -366,8 +368,10 @@ if(VLLM_GPU_LANG STREQUAL "CUDA")
368 set_gencode_flags_for_srcs(
369 SRCS "${MARLIN_SRCS}"
370 CUDA_ARCHS "${MARLIN_ARCHS}")
369 - set_source_files_properties("csrc/quantization/gptq_marlin/gptq_marlin.cu"
370 - PROPERTIES COMPILE_FLAGS "-static-global-template-stub=false")
371 + if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.8)
372 + set_source_files_properties("csrc/quantization/gptq_marlin/gptq_marlin.cu"
373 + PROPERTIES COMPILE_FLAGS "-static-global-template-stub=false")
374 + endif()
375 list(APPEND VLLM_EXT_SRC "${MARLIN_SRCS}")
376
377 message(STATUS "Building Marlin kernels for archs: ${MARLIN_ARCHS}")
@@ -859,8 +863,10 @@ if(VLLM_GPU_LANG STREQUAL "CUDA")
863 set_gencode_flags_for_srcs(
864 SRCS "${MOE_WNAA16_MARLIN_SRC}"
865 CUDA_ARCHS "${MARLIN_MOE_ARCHS}")
862 - set_source_files_properties(${MOE_WNAA16_MARLIN_SRC}
863 - PROPERTIES COMPILE_FLAGS "-static-global-template-stub=false")
866 + if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.8)
867 + set_source_files_properties(${MOE_WNAA16_MARLIN_SRC}
868 + PROPERTIES COMPILE_FLAGS "-static-global-template-stub=false")
869 + endif()
870
871 list(APPEND VLLM_MOE_EXT_SRC ${MOE_WNAA16_MARLIN_SRC})
872