Repository navigation
Shard DG state over spatial cells - #40
Closed
rogeriojorge wants to merge 2 commits into
Closed
rogeriojorge wants to merge 2 commits into
rogeriojorge wants to merge 2 commits into
Conversation
rogeriojorge
force-pushed
the
agent/dg-spatial-sharding
branch
from
July 17, 2026 20:07
6fab1b6 to
c515549
Compare
rogeriojorge
force-pushed
the
agent/dg-pytree-state
branch
from
July 17, 2026 20:19
4fc1c1b to
8fabbfa
Compare
rogeriojorge
force-pushed
the
agent/dg-spatial-sharding
branch
from
July 17, 2026 20:20
c515549 to
3f9c968
Compare
rogeriojorge
marked this pull request as ready for review
July 17, 2026 20:21
rogeriojorge
force-pushed
the
agent/dg-pytree-state
branch
from
September 26, 2026 21:25
8fabbfa to
87811c7
Compare
Member
Author
|
Squashed into #39, which now contains the sharding change. |
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.
What changed
x,y, orz)shard_mapsolveThis is stacked on #39 so the sharding diff can be reviewed independently. The default serial behavior is unchanged.
Root cause
Two details made the earlier implementation invalid on multiple GPUs. A local
rollwrapped at each device boundary instead of the periodic domain boundary, and placing an already materialized single-GPU JAX array with replicatedNamedShardingleft zero-valued replicas on GPU 1 in the office environment. Diffrax still reported success while the 2D state became NaN. The revised path stages arrays from host memory, declares layouts with an Explicit mesh, and exchanges only the boundary cell withppermute.The sharded solve is a module-level JIT so repeated calls reuse compilation; constructing
shard_mapinsidesimulationcaused repeated compilation and hid scaling behind JIT overhead.Validation
pytest -q: 5 passedJAX_NUM_CPU_DEVICES=2: passedScope
This PR establishes correct single-axis spatial decomposition. Larger nonlinear GEM production runs and physics validation remain in the separate example PR so this numerical infrastructure change stays reviewable.