Fix low-latency EP epoch race with host-assigned dispatch epochs - #875
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Caio Rocha (caiocbr)
requested review from
Binyang Li (Binyang2014)
and
a balanced review from Copilot
August 14, 2026 11:23
Contributor
There was a problem hiding this comment.
Pull request overview
Moves low-latency dispatch epoch assignment from GPU workspace state to the host runtime.
Changes:
- Adds host-managed dispatch epochs to workloads.
- Uses workload epochs for dispatch/combine synchronization.
- Removes the workspace epoch allocation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/ext/ep/low_latency/dispatch.cu |
Consumes workload epoch. |
src/ext/ep/low_latency/config.cuh |
Removes workspace epoch storage. |
src/ext/ep/low_latency/combine.cu |
Uses workload epoch for synchronization. |
src/ext/ep/ll_runtime.hpp |
Adds host epoch state. |
src/ext/ep/ll_runtime.cc |
Assigns and propagates epochs. |
src/ext/ep/include/api.cuh |
Adds epoch to Workload. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Binyang Li (Binyang2014)
approved these changes
Aug 14, 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.
Summary
Assign low-latency dispatch epochs once in
MoELowLatencyRuntimeand pass the epoch to dispatch and combine throughWorkload.Previously, each CUDA block derived the epoch from device workspace state while block 0 updated that state without a grid-wide ordering guarantee. Late blocks could therefore observe a different epoch and wait indefinitely on readiness flags.
Changes
MoELowLatencyRuntime.This gives every block in a launch one immutable epoch value.
Validation