Skip to content

[None][fix] handle ADP dummy allocation failure - #14286

Closed
qiaoxj07 wants to merge 1 commit into
NVIDIA:feat/deepseek_v4from
qiaoxj07:codex/adp-dummy-none-guard
Closed

[None][fix] handle ADP dummy allocation failure#14286
qiaoxj07 wants to merge 1 commit into
NVIDIA:feat/deepseek_v4from
qiaoxj07:codex/adp-dummy-none-guard

Conversation

@qiaoxj07

Copy link
Copy Markdown
Collaborator

Description

PR #14255 made KVCacheManagerV2.add_dummy_requests() return None when KV cache resources cannot be allocated, for example when the V2 IndexMapper is saturated by disaggregated generation transfer state. The attention-DP dummy padding caller still indexed the return value directly, which turned the expected allocation failure path into a TypeError: 'NoneType' object is not subscriptable.

This change handles the None return in _pad_attention_dp_dummy_request() by skipping dummy insertion for the current iteration. That leaves the rank empty, allowing the existing queue/forward gating to avoid the forward pass and retry on a later iteration after resources become available.

Test Coverage

  • PYTHONPYCACHEPREFIX=/private/tmp/pycache python3 -m py_compile tensorrt_llm/_torch/pyexecutor/py_executor.py tests/unittest/_torch/executor/test_benchmark_disagg.py
  • git diff --check
  • python3 -m pytest tests/unittest/_torch/executor/test_benchmark_disagg.py -k PadAttentionDpDummyBenchmarkDisagg (not run locally: pytest is not installed in the local Python environment)

Signed-off-by: Xianjie <5410381+qiaoxj07@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant