Skip to content

Add sharing capabilities#473

Open
ptiede wants to merge 2 commits into
mainfrom
ptiede-shard
Open

Add sharing capabilities#473
ptiede wants to merge 2 commits into
mainfrom
ptiede-shard

Conversation

@ptiede

@ptiede ptiede commented Jul 2, 2026

Copy link
Copy Markdown
Owner

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.

ptiede and others added 2 commits July 1, 2026 07:59
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant