[None][fix] handle ADP dummy allocation failure - #14286
Closed
qiaoxj07 wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Xianjie <5410381+qiaoxj07@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PR #14255 made
KVCacheManagerV2.add_dummy_requests()returnNonewhen KV cache resources cannot be allocated, for example when the V2IndexMapperis 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 aTypeError: 'NoneType' object is not subscriptable.This change handles the
Nonereturn 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.pygit diff --checkpython3 -m pytest tests/unittest/_torch/executor/test_benchmark_disagg.py -k PadAttentionDpDummyBenchmarkDisagg(not run locally:pytestis not installed in the local Python environment)