config, envs: pass use_replayssm to the breakable-graph fallback; register VLLM_FAIL_ON_PROFILING_KV_LEAK

CompilationConfig.resolve_cudagraph_mode_and_sizes read self.cache_config.use_replayssm, but CompilationConfig has
no cache_config, so with VLLM_USE_BREAKABLE_CUDAGRAPH=1 the fallback branch raised AttributeError. Both model
runners now pass cache_config.use_replayssm as an argument. The shipped launchers set VLLM_USE_BREAKABLE_CUDAGRAPH=0
and never reach this branch.

VLLM_FAIL_ON_PROFILING_KV_LEAK was read with a raw os.getenv, so setting it printed the unknown-variable warning. It
is now registered in vllm.envs with the same spellings (unset fails the boot; 0, false or no warn instead), listed
as an ignored compile factor and read through vllm.envs. Tests cover both.

Co-Authored-By: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-09 20:15:12 +07:00
co-authored by Hinata
parent 86d314050f
commit 69aed12cf8
5 changed files with 20 additions and 5 deletions
+3 -1
View File
@@ -1390,6 +1390,7 @@ class CompilationConfig:
max_num_reqs: int | None = None,
is_profiling: bool = False,
piecewise_capture_available: bool = True,
use_replayssm: bool = False,
) -> CUDAGraphMode:
from vllm.v1.attention.backend import AttentionCGSupport
@@ -1443,7 +1444,8 @@ class CompilationConfig:
)
) or (
envs.VLLM_USE_BREAKABLE_CUDAGRAPH
and self.cache_config.use_replayssm
# CompilationConfig has no cache_config; the runner passes the flag.
and use_replayssm
):
# Breakable CUDA graphs break at the attention kernels at runtime,
# with or without torch.compile.