Frank Schlimbach ffc7feadec
[mlir][mesh] Handling changed halo region sizes during spmdization (#114238)
* Changed `MeshSharding::sharded_dims_sizes` from representing sizes per
  shard to offsets to origin per shard.
  - Local shard size are now a simple subtraction
  - Offsets are now readily available without a reduction operation
  - Enables constant value/shape propagation through standard
    canonicalization
  - Renamed to `sharded_dims_offsets` accordingly.
* First spmdization pattern for halo regions.
  - Triggers when source and destination shardings differ only in their
    halo sizes
- Copies local data from source into a new tensor and calls update_halo
- Supports arbitrary mesh dimensions (unlike the other patterns which
  work on 1d meshes only)
* `UpdateHaloOp` implements `DestinationStyleOpInterface` and accepts
  tensors and memrefs
  - also accepts target and source halo sizes; both are required for
    proper lowering
* minor refactoring for testing partial MeshSharding equality
* Canonicalization for ShardingOp folding constant values into
  respective `static_*` attributes
2024-11-10 21:49:50 -08:00
..