Repository navigation
Conversation
With overlap scheduling and speculative decoding on ROCm, the FutureMap publish waits block the host (publish_ready.synchronize()): an Event.wait() on the separate schedule stream leaves a cross-queue wait pending while the forward graph runs, and that slows every dispatch of the graph. Schedule on the forward stream instead, so stream order carries the forward-to-schedule dependencies and the publish waits stay in one queue. Without speculation there is no publish wait and the separate schedule stream keeps overlapping the next batch's preparation, so it stays.
jhinpan
force-pushed
the
perf/amd-hip-forward-stream-overlap
branch
from
September 24, 2026 04:51
e21179c to
ff356eb
Compare
Collaborator
Author
|
Carried onto |
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.
Motivation
With overlap scheduling and speculative decoding on ROCm,
FutureMap.resolve_seq_lens_cpuandresolve_mixed_spec_tailsblock the host on the previous forward's publish event (publish_ready.synchronize()). The scheduler cannot prepare the next step while the verify graph runs, so the GPU idles between the DSpark verify and the next draft.Event.wait()was rejected for regressing TPOT. The cost comes from where that wait sits: the schedule stream is another HIP queue, and a device wait left pending in another queue while a HIP graph runs slows every dispatch of that graph. On MI355X a 512-kernel graph takes 1541 us instead of 853 us with such a wait pending, and swapping the host sync forEvent.wait()alone made the DSpark verify graph 1.2 ms slower per cycle.Modifications
Event.wait(). Stream order carries the forward-to-schedule dependencies: the host no longer blocks, and nothing waits in another queue while the forward graph runs.Accuracy Tests
GSM8K (64 fixed questions, natural EOS) and 8 retrieval probes on every server: 62/64 GSM8K and 8/8 retrieval in both arms. On this base batch-1 outputs already differ between fresh servers of the same arm (base vs base: 15/64 identical GSM8K sequences, 62/64 same answer), and the base-vs-PR agreement stays in that range (12-20/64 identical, 62/64 same answer).
Speed Tests and Profiling
MI355X x4, TP4/EP4, DeepSeek-V4.1-Flash
dba1be0a, this branch ate2e824dc58, the cookbook MI350X Low-Latency cell (DSpark block 5), AITER built as in this branch's Dockerfile. Both arms also carry #8's int64 FlashMLA store fix. Fresh servers per arm, real acceptance, no profiler during timing.Batched runs report cycle time (batch x acceptance length / decode tok/s inside the window where every request is decoding) because batched outputs, and with them acceptance, vary run to run in both arms.
Checklist
CI States
Latest PR Test (Base): ❌ Missing
run-cilabel -- add it to run CI tests.Latest PR Test (Extra): ❌ Blocked --
run-ciis required first.Latest PR Test (AMD ROCm 7.2): ➖ No AMD PR run found for this commit.