Repository navigation
Conversation
Signed-off-by: John Pezzulli <38448408+jpezzulli@users.noreply.github.com>
jpezzulli
requested review from
Fridge003,
Ying1123,
alphabetc1,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann and
yizhang2077
as code owners
August 27, 2026 23:08
This branch has not been deployed
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
HiCache restores Mamba state layer by layer on its H2D transfer stream. A
restored radix slot can be selected as the source of deferred Mamba copy-on-
write before that layerwise transfer has finished. Deferred COW consumes the
entire source slot at once, before the model's existing per-layer waits can
order those reads, so it can copy a partially restored state into the request-
owned destination.
Modifications
HybridReqToTokenPool.wait_for_hicache_load_complete(), which waits forthe final event in the active layer transfer counter and is a no-op when no
HiCache load is active.
clear-only path and ordinary per-layer Mamba reads are unchanged.
ordering.
This is complementary to #36738:
The two changes protect opposite sides of the load and can merge independently.
Accuracy Tests
The two focused regressions fail on
dc10483592:They pass with this change:
The complete registered Mamba unit file also passes:
Speed Tests and Profiling
No benchmark was run. The wait is reached only for deferred whole-slot Mamba
COW while a HiCache layer transfer counter is active. It adds no work when
there is no active load; when there is one, waiting for the final transfer is
the required ordering.
Checklist
CI States
Latest PR Test (Base): ❌ Run #33125188060
Latest PR Test (Extra): ❌ Run #33125187898
Latest PR Test (AMD ROCm 7.2): ❌ Run #33125188020