feat(scheduler): split store_cache_main_prep into sub-phase timers#1243
Merged
jundot merged 1 commit intoMay 14, 2026
Merged
Conversation
Replace the aggregate store_cache_main_prep timer with three sub-phase timers (boundary / collect / dispatch) mirroring the boundary_capture_* granularity already in use. Helps isolate which store-cache prep sub-step dominates across model architectures.
Owner
|
Thanks for this. The split matches the existing |
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
store_cache_main_prepwraps three distinct operations as a single timing measurement — boundary override lookup, KV array collection, and async_eval dispatch. When diagnosing store-cache overhead across model architectures (standard transformer vs GatedDeltaNet/ArraysCache vs MoE), the aggregate doesn't reveal which sub-step dominates. On ArraysCache models, for example, collect and dispatch are both near-zero (emptypre_eval_arrays), but the single timer can't distinguish that from a model where boundary merge dominates.Changes
Split into three sub-phase timers following the
boundary_capture_sync/boundary_capture_extract/boundary_snapshot_savepattern already in use:store_cache_main_boundary— boundary override lookup + optional merge with full cachestore_cache_main_collect—_collect_arrays_from_extracted_cachetraversalstore_cache_main_dispatch—mx.async_evalenqueueThe
mx.stream(generation_stream)context remains the outer wrapper. No behavioral change — only diagnostic granularity.Test plan
store_cache_main_prep=X.Xms/Nto three separate entries