Error with CUDA Graph Memory Calculations on T<4 set ups

#10
by corgito - opened

I think i've isolated an error where if you don't --enforce-eager on 2xb200 setups the memory calculations are always off so even when you control for K/V cache size and memory allocation size it fails.

For 2xB200's this works:

--model RLibertAIDAI/GLM-5.3-Flash-NVFP4 --tensor-parallel-size 2 --no-enable-flashinfer-autotune --tool-call-parser glm47 --enable-auto-tool-choice --reasoning-parser glm45 --gpu-memory-utilization 0.95 --kv-cache-memory 48407431066 --enforce-eager --kv-cache-dtype fp8

LibertAI org

Thanks for isolating this, and sorry for the slow reply. We haven't reproduced it on 2×B200 ourselves, but the pattern fits a known vLLM behaviour: with an explicit --kv-cache-memory, vLLM skips its profiling-based budget, so the memory that CUDA-graph capture allocates isn't reserved. Capture then fails or OOMs even though the KV size and --gpu-memory-utilization look right, and --enforce-eager sidesteps it because there's no capture.

Two things to try that keep graphs (worth a lot of decode speed):

  • drop --kv-cache-memory and let vLLM size the KV from --gpu-memory-utilization (e.g. 0.90), or
  • keep it, but cap the capture sizes, e.g. --compilation-config '{"max_cudagraph_capture_size": 64}' (or match your --max-num-seqs).

If either works on your setup, a note here would help others.

Sign up or log in to comment