[None][fix] Backport nonblocking CTX transfer polling to M3 - #17428
Merged
peihu-nv merged 2 commits intoAug 7, 2026
Merged
Conversation
`_check_disagg_transfer_progress_when_idle` gated its work behind two rank-collectives (`_sync_disagg_gen_status_entry` / `_sync_disagg_ctx_status_entry`) and then issued a blocking `atLeastNum=1` wait on whichever direction won the vote. The vote input was derived from purely local scheduler state (`num_fitting_reqs`, `fitting_disagg_gen_init_requests`, `wait_for_disagg_gen_transfer_progress`, `all_gen_first`), so every disagg iteration paid for an extra allreduce or allgather just to decide whether to poll, and the winning branch could block the executor loop on an unfinished transfer. Both `_check_disagg_ctx_cache_transfer_status` and `_check_disagg_gen_cache_transfer_status` already perform their own internal cross-rank consensus and are safe to enter unconditionally with `atLeastNum=0`. Entering both non-blocking polls on every iteration keeps all ranks symmetric without the extra collective, and reaps completed transfers so their KV blocks are freed just the same. Ranks with nothing in flight simply reap nothing. The synchronous-transfer early return is preserved: a synchronous GEN receive is rank-local and blocking, so one rank can still be receiving while another is idle, which makes entering either progress collective unsafe. Removes the now-unused `_sync_disagg_gen_status_entry` and `_sync_disagg_ctx_status_entry` helpers and drops the per-iteration `all_gen_first` scan over `active_requests` at both call sites. Signed-off-by: Iman Tabrizian <10105175+tabrizian@users.noreply.github.com>
…heck `_check_disagg_transfer_progress_when_idle` polled both directions, but the GEN poll was always a repeat of one that already ran earlier in the same iteration: - The loop head (`_executor_loop_pp` / `_prepare_and_schedule_batch`) calls `_check_disagg_gen_transfer_status`, which enters `_check_disagg_gen_cache_transfer_status(0)` unconditionally. - If scheduling started new receives, `_prepare_disagg_gen_init` -> `_recv_disagg_gen_cache` already polls GEN status right after issuing them. So in both cases the second call re-ran the GEN status query and its internal cross-rank consensus for nothing. Keep only the CTX poll here. The synchronous-transfer early return is unchanged: a synchronous GEN receive is rank-local and blocking, so one rank can still be receiving while another is idle, which makes entering the context progress collective unsafe. Signed-off-by: Iman Tabrizian <10105175+tabrizian@users.noreply.github.com>
Collaborator
Author
|
/bot run |
Collaborator
|
PR_Github #64673 [ run ] triggered by Bot. Commit: |
pcicotti
approved these changes
Aug 7, 2026
Collaborator
|
PR_Github #64673 [ run ] completed with state
|
Collaborator
Author
|
/bot run |
pcicotti
approved these changes
Aug 7, 2026
1 task
Collaborator
|
PR_Github #64692 [ run ] triggered by Bot. Commit: |
Collaborator
|
PR_Github #64692 [ run ] completed with state |
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
Backports #17324 to
feat/m3_with_msa.After the idle transfer poll was removed, completed context KV transfers could remain unreaped when scheduling stalled. Their KV blocks stayed pinned, so the context executor could stop admitting work even though transfers had completed.
This change replaces the local-scheduler-state-gated blocking progress checks and their extra entry collectives with a rank-symmetric, nonblocking context transfer poll on every asynchronous disaggregated executor iteration. The idle helper does not repeat the generation poll because the normal loop head and receive path already poll generation transfer status. The synchronous-transfer early return is preserved because ranks may be inside rank-local blocking receives.
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.