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
+13
View File
@@ -471,6 +471,11 @@ if TYPE_CHECKING:
# it changes the ring views' block stride and which block table the PLE
# state is read through, so ON and OFF must not share a compile cache.
VLLM_E2_SIDE_CACHE_LAYOUT: bool = True
# Profiling-teardown leak policy (vllm/v1/worker/gpu/cudagraph_utils.py): a profiling
# KV cache still allocated after teardown fails the boot by default; "0", "false" or
# "no" downgrade it to a warning while diagnosing. AOT: no. CAPTURE: no -- it only
# decides whether a host-side check raises.
VLLM_FAIL_ON_PROFILING_KV_LEAK: bool = True
# Opt-out for the fork startup guards in vllm/v1/e2_guards.py, read at
# Qwen4ExpForCausalLM construction. AOT: no. CAPTURE: no -- it changes
# nothing itself; it only permits a boot whose identity IS different
@@ -2712,6 +2717,11 @@ environment_variables: dict[str, Callable[[], Any]] = {
"VLLM_E2_SIDE_CACHE_LAYOUT": lambda: _e2_strict_switch(
"VLLM_E2_SIDE_CACHE_LAYOUT", default=True
),
# Profiling-teardown leak policy: fail the boot unless "0"/"false"/"no".
"VLLM_FAIL_ON_PROFILING_KV_LEAK": lambda: os.getenv(
"VLLM_FAIL_ON_PROFILING_KV_LEAK", "1"
).strip().lower()
not in ("0", "false", "no"),
# Seconds between `topk-exact-counters` lines from each GPU worker
# (0, the default, disables the reader entirely). The line reports the
# medium-path exact-restart counters; see
@@ -2967,6 +2977,9 @@ def compile_factors() -> dict[str, object]:
# compiled and the worker's tables are identical in both worlds, so an
# A/B flip must reuse the same AOT cache.
"VLLM_E2_MAMBA_RETAIN_CHECKPOINT",
# Boot-failure policy of a host-side profiling-teardown check; read by no
# compiled code.
"VLLM_FAIL_ON_PROFILING_KV_LEAK",
# Logging cadence for an already-compiled kernel's counters: it gates a
# host-side timer and a snapshot op, and is read by no compiled code, so
# hashing it would invalidate every compile cache for a log interval.