Repository navigation
[PD] Prioritize ready handoffs before prefill submission - #122
Merged
Merged
Conversation
bjf-frz
marked this pull request as ready for review
October 14, 2026 07:28
1 task done
This was referenced Oct 22, 2026
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.
Ready PD transfer chunks can wait behind unrelated prefill submissions. The owner thread sends at most one chunk per request per tick, then submits more GPU work; CUDA launch backpressure can block that thread before it returns to NIXL progress. One observed request waited 2.21 s between prefill completion and the final handoff commit.
This change defers new prefill submission while a queued transfer chunk is ready. The existing event loop continues polling transfers and control messages, preserving transfer limits and allowing cancellation under backpressure. Unready chunks do not prevent other prefill work. Runtime change: 5 added lines, plus two regression tests.
Follow-up to #77, based on merged main
43881d8.Validation
test_run_refuses_the_stored_baseline_at_another_depth, also reproduces on the unmodified baseline: installed Transformers 5.14.1 lacksAutoModelForVision2Seq.git diff --checkpassed.Performance scope and tradeoff
Unprofiled diagnostic on 2×B300, official Nanbeige4.2-3B, BF16/Triton, fixed two loops, async scheduling, no graphs/prefix cache. Per run: 12 requests arriving every 0.5 s, alternating 128/4096 input tokens, 64 greedy output tokens with EOS ignored; three warmed repetitions. Values are medians of per-run statistics. This is a short diagnostic workload, not a steady-state capacity benchmark.
All 36/36 outputs match the original. Commit marks transfer submission, not transfer completion.
Draft for review: the patch removes avoidable handoff submission delay, but does not establish a throughput gain and regresses median E2E in this diagnostic. Scheduling/overlap tradeoffs need further evaluation before merging; the original 60-second Poisson workload matrix has not been rerun with this patch. Separate ops-only/full traces attribute the owner-thread blocking to CUDA
Command Buffer Fullwaits; those profiled timings are excluded from the table.