Skip to content

personal/egparedes: connectivities as types — update to the implementation - #33

Open
egparedes wants to merge 1 commit into
mainfrom
egparedes/connectivities-as-types-implemented
Open

egparedes wants to merge 1 commit into
mainfrom
egparedes/connectivities-as-types-implemented

Conversation

@egparedes

Copy link
Copy Markdown
Contributor

Updates the connectivities as types note (#32) to the design as implemented in the GridTools/gt4py stack:

GridTools/gt4py#2898 → #2899 → #2907 → #2908 → #2909 → #2910 → #2911 → #2912 (ADR 0028: dimensions as nominal types; ADR 0029: connectivities as types).

What changed in the note

  • TL;DR / status: an implementation-status callout.
  • Concepts and sketch rewritten to the real code:
    • no DimensionBaseIndex, and LocalDimensionIndex subclasses DimensionIndex
    • NeighborConnectivity is not a Connectivity
    • offset_tag names a connectivity in the IR
    • a connectivity can adopt an existing local dimension, or share one (flattened sparse offsets like ICON4Py's C2CE)
    • MultiDimensionIndex is a tuple subclass
    • as_offset(KDim, field)
  • Identity rules: what resolve memoizes (so redefined declarations are found), the interactive-__main__ fallback, the narrow copyreg hook for Staggered[D], fingerprinting, the corrected injective mangling (the original scheme was not injective), and a new rule on offset_tag.
  • Binding model: providers are normalized to tags at the entry points, and tables are checked against declarations once per compiled variant, including the same-structure requirement for tables over one shared local dimension.
  • Effect per layer / what it deletes: updated. ts.OffsetType, iterator.runtime.offset and the string-keyed providers below the entry points are kept.
  • Open questions: each answered as implemented. Naming convergence with dependent-local-dimensions is still open.
  • StagingImplementation: the PR table and a list of where the implementation departs from the original proposal.
  • The research appendix is marked as a historical record of the pre-implementation tree.

status stays draft: this was written with AI assistance and needs a human review.

…ation

The design as implemented in the GridTools/gt4py stack #2898, #2899,
#2907-#2912 (ADRs 0028, 0029): corrected concepts and sketch, binding model,
shared local dimensions, answered open questions, the PR stack, and where the
implementation departs from the original proposal.

This branch has not been deployed

No deployments
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