You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contrast device that passes: discrete RTX Pro 6000 Blackwell (dedicated VRAM), same TRT-LLM 1.3.0rc17.
Who can help?
Maintainers of the PyTorch-flow KV-cache memory estimator (tensorrt_llm/_torch/pyexecutor/_util.py: KvCacheCreator._get_token_num_for_estimation / CacheCost).
Information
The official example scripts (standard trtllm PyTorch-flow serving)
My own modified scripts
Tasks
My own task: serve a hybrid Mamba+attention model on an integrated GPU.
Reproduction
On an integrated/unified-memory GPU (compute capability 12.x, GB10/DGX Spark), serve a ~31B hybrid Mamba+attention model (attention window 3000 + mamba layers) in bf16, TP=1, PyTorch flow, with kv_cache_config.enable_block_reuse=false.
The ~58.8 GB bf16 weights are mmap'd from safetensors. On integrated GPUs TRT-LLM keeps them in shared host memory and logs: "Skipping device transfer from cpu to cuda on integrated GPU to conserve shared memory."
KV-cache estimation runs.
Expected behavior
On a discrete GPU with the same rc17 binary and identical config, the estimation dry run yields {3000: (512, 0), -2147483647: (512, 0)} and the server starts successfully (exit 0).
actual behavior
On the integrated GPU, torch.cuda.mem_get_info().free is depressed because the mmap'd model weights are resident in the same physical pool as torch's weight copy. In _get_token_num_for_estimation the estimation budget free_gpu_memory_fraction * free is then reduced by the affine CacheCost intercept (the mamba recurrent-state fixed cost — observed at ~12.78 GB), and CacheCost.tokens_for_budget clamps the result to 0. The estimation dry run gives the attention window 0 primary blocks ({3000: (0, 0), -2147483647: (512, 0)}), and assert max_blocks_per_seq > 0 ("Impossible to fit in any sequence in kvCache") fires at resource_manager.py get_max_atten_window_upper_bound.
Validated experimentally: dropping the intercept in the estimation dry-run sizing only (restoring rc14 proportional behavior) makes the same rc17 binary pass on the integrated GPU (dry-run blocks recover to {3000: (512, 0), ...}, exit 0). The real post-profiling allocation is unaffected by the change.
Suggested fix direction: in the estimation dry run on integrated/unified-memory devices, either (a) size from the true device budget rather than the mmap-depressed mem_get_info().free, or (b) treat the recurrent-state fixed cost as a reservation rather than subtracting it before clamping max_tokens to 0, or (c) account for the integrated-GPU double-resident weights when computing the estimation free budget.
Before submitting a new issue...
Searched for relevant issues and checked documentation/examples.
System Info
Who can help?
Maintainers of the PyTorch-flow KV-cache memory estimator (tensorrt_llm/_torch/pyexecutor/_util.py: KvCacheCreator._get_token_num_for_estimation / CacheCost).
Information
Tasks
Reproduction
Expected behavior
On a discrete GPU with the same rc17 binary and identical config, the estimation dry run yields {3000: (512, 0), -2147483647: (512, 0)} and the server starts successfully (exit 0).
actual behavior
On the integrated GPU, torch.cuda.mem_get_info().free is depressed because the mmap'd model weights are resident in the same physical pool as torch's weight copy. In _get_token_num_for_estimation the estimation budget free_gpu_memory_fraction * free is then reduced by the affine CacheCost intercept (the mamba recurrent-state fixed cost — observed at ~12.78 GB), and CacheCost.tokens_for_budget clamps the result to 0. The estimation dry run gives the attention window 0 primary blocks ({3000: (0, 0), -2147483647: (512, 0)}), and
assert max_blocks_per_seq > 0("Impossible to fit in any sequence in kvCache") fires at resource_manager.py get_max_atten_window_upper_bound.additional notes
Before submitting a new issue...