Repository navigation
[Build] Compress fatbins with --compress-mode=size on CUDA >= 13 - #216
Merged
Merged
Conversation
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 <noreply@anthropic.com> Signed-off-by: mgoin <mgoin64@gmail.com>
mgoin
marked this pull request as ready for review
November 3, 2026 20:32
mgoin
added a commit
to mgoin/vllm
that referenced
this pull request
Nov 3, 2026
…=size Picks up vllm-project/flash-attention#216, which passes --compress-mode=size for CUDA >= 13 like vLLM's own extensions, plus vllm-project/flash-attention#199 (SM90 FP8 forward for head dim 512). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: mgoin <mgoin64@gmail.com>
Open
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Pass
--compress-mode=sizeto nvcc for CUDA >= 13. This mirrors the block in vLLM'sCMakeLists.txtthat already does this for vLLM's own extensions.VLLM_FA_GPU_FLAGSdoesn't inheritVLLM_GPU_FLAGS, so FA was missing it. With default settings,fatbinarycompresses only PTX and debug images, so all FA2/FA3 SASS has been stored uncompressed.Impact (release arch list, CUDA 13.0)
Built at the commit vLLM pins (b273a02) plus this patch, with
TORCH_CUDA_ARCH_LIST='7.5 8.0 8.6 8.9 9.0 10.0 11.0 12.0'. Compared against the.sofiles in the vLLM 0.33.0 x86_64 wheel on PyPI (same commit, nvcc 13.0.88):.nv_fatbin_vllm_fa2_Cbefore_vllm_fa2_Cafter_vllm_fa3_Cbefore_vllm_fa3_CafterThat's about 82 MB off the vLLM wheel (335 MB → about 253 MB) and about 347 MB off the installed size.
Validation
cuobjdump -xelf/-xptxand hashed each kernel's.text.*section:_INTERNAL_<hash>symbol names, which come from the build environment.scaled_dot_product_attentionwith a max abs error of 0.0118. The first call took 9.7 s withCUDA_CACHE_DISABLE=1.Choosing the flag
I compiled one FA2 TU (
flash_fwd_split_align_hdim128_bf16_causal_sm80.cu, sm_80 SASS plus compute_80 PTX) with each option:.o--compress-mode=balance-Xfatbin=-compress-all--compress-mode=size--compress-mode=size -Xfatbin=-compress-all--compress-mode=sizealready compresses every image, SASS included, so adding-Xfatbin=-compress-allchanges nothing.-compress-allonly helps for builds without--compress-mode, such as CUDA 12. I've kept this to the same CUDA >= 13 gate vLLM uses.After this merges, vLLM needs a
GIT_TAGbump incmake/external_projects/vllm_flash_attn.cmaketo pick it up.AI assistance was used to write and validate this change.
🤖 Generated with Claude Code