Repository navigation
[CP] Reuse CPU sequence metadata and cache linear-attention routing plans - #5549
Closed
acisseJZhong wants to merge 1 commit into
Closed
acisseJZhong wants to merge 1 commit into
acisseJZhong wants to merge 1 commit into
Conversation
acisseJZhong
force-pushed
the
codex/la-cp-routing-metadata
branch
2 times, most recently
from
October 20, 2026 00:42
b4c842d to
3809a31
Compare
acisseJZhong
force-pushed
the
codex/la-cp-routing-metadata
branch
from
October 20, 2026 01:59
3809a31 to
9c7ebb9
Compare
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
CP linear-attention routing currently copies GPU document offsets and token permutations back to the CPU to construct routing plans. Reuse the microbatch's CPU positions during preprocessing to avoid this synchronization for contiguous and head-tail CP layouts.
Test plan
0980e1cb1c9a) due to missing local PyTorch/SPMD APIs.Local tests used the repository-pinned AttentionGym 0.0.17 in a temporary import path and postponed evaluation of one incompatible type annotation. No computation or collective implementation was replaced. End-to-end throughput has not been measured.