Conversation
mcwitt
added this pull request to stack #9121
September 12, 2026 00:00
mcwitt
force-pushed
the
long-context/03-short-conv-context
branch
from
September 14, 2026 21:46
0f6a9ad to
39b8bb7
Compare
Exchange the left neighbor's activations and segment IDs before running the local convolution, then discard halo outputs. This preserves causal values and gradients across sequence shards for the reference and Pallas backends. Reject halos larger than one local sequence because the exchange reads only the adjacent shard. The context-parallel path keeps the channel-axis guard of the unsharded path, so a channel dimension that is genuinely sharded over "model" raises instead of being silently all-gathered by the reshard. Part of #8754 Claude-Session: https://claude.ai/code/session_01LqJCYaT5tpPJCyrrfYBRS6
Use the Pallas out-of-bounds segment ID for context halos and right padding so both paths share the packed-sequence boundary contract. Part of #8754
mcwitt
force-pushed
the
long-context/03-short-conv-context
branch
from
September 14, 2026 22:19
39b8bb7 to
a8fe563
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.
Exchange the left neighbor's activations and segment IDs before running the local convolution, then discard halo outputs. This preserves causal values and gradients across sequence shards for the reference and Pallas backends. Reject halos larger than one local sequence because the exchange reads only the adjacent shard. The context-parallel path keeps the channel-axis guard of the unsharded path, so a channel dimension partitioned across multiple "model" shards raises instead of being silently all-gathered when resharding for the local convolution.
Stacked on #9117.
Part of #8754