From 7318fb1d394f716e0b0b2fa47254488489e4fc28 Mon Sep 17 00:00:00 2001 From: mgoin Date: Tue, 3 Nov 2026 20:03:22 +0000 Subject: [PATCH] [Build] Compress fatbins with --compress-mode=size on CUDA >= 13 vLLM's own extensions already pass --compress-mode=size for CUDA >= 13, but VLLM_FA_GPU_FLAGS does not, so the FA2/FA3 SASS is stored uncompressed in the fatbins (by default nvcc's fatbinary only compresses PTX). Co-Authored-By: Claude Opus 5.5 Signed-off-by: mgoin --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7dd915265f..4bb80228e9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,15 @@ if (NVCC_THREADS AND VLLM_GPU_LANG STREQUAL "CUDA") list(APPEND VLLM_FA_GPU_FLAGS "--threads=${NVCC_THREADS}") endif () +# +# Set compression mode for CUDA >=13.x. +# +if (VLLM_GPU_LANG STREQUAL "CUDA" AND + DEFINED CMAKE_CUDA_COMPILER_VERSION AND + CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) + list(APPEND VLLM_FA_GPU_FLAGS "--compress-mode=size") +endif () + # Other flags list(APPEND VLLM_FA_GPU_FLAGS --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math)