Add sharing capabilities#473
Open
ptiede wants to merge 2 commits into
Open
Conversation
Fixes from the code review of the Ti/Fr regrouping + Reactant sharding work: - Replace the bespoke `_planeorder_perm` with `ComradeBase.regroup(domain, grid)`, so the data-side plane ordering has a single definition (no "keep in sync" hazard). Gains `isapprox` matching (float round-off no longer silently skips regrouping) for free. - Guard `_regroup_dataproducts` against non-closure products of differing length (clear `ArgumentError` instead of a silent row-drop / `BoundsError`). - Make `_grouping_axes` derive from `keys(grid)[3:end]` rather than a hardcoded Ti/Fr filter, matching the NUFFT's non-spatial-dim convention. - Shard the stored data products (`prepare_device(::EHTObservationTable)`) onto the same mesh blocks as their likelihoods so `post.data` and `post.lklhds` don't hold the measurement in two divergent device layouts. - Document that ragged blocks are fine: XLA reshards for correctness; the split is only a best-effort locality hint. - Tests: coherency sharding testset, plus isapprox / length-guard / data-shard coherence assertions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
This is a first attempt at adding sharding capabilities to Comrade. This will likely go through a few iterations but right now we have the ability to shard along several axes including joing sharding in time and frequency which is something we will want for things like ALMA and VLA.