Skip to content

personal/egparedes: connectivities as types — follow the design of gt4py#2899 - #44

Draft
egparedes wants to merge 5 commits into
mainfrom
connectivities-as-types-follow-2899
Draft

egparedes wants to merge 5 commits into
mainfrom
connectivities-as-types-follow-2899

Conversation

@egparedes

@egparedes egparedes commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Updates the connectivities-as-types proposal to the code of the re-implemented stack.

GridTools/gt4py#2899 (read at f4981aff2; 0daf07ea2 only adds docs):

  • tags are module:qualname; DimensionRef values below the frontend, so nothing is imported from a tag;
  • dimension classes compare, hash, pickle and are fingerprinted by their DimensionRef (synthesize_dimension);
  • dimensions are declared at module level with a class statement; <locals> is rejected;
  • DimensionRange / .at, iterator.builtins.ConstList, the preparation PRs #3087 and #3088;
  • the Domain truthiness hazard, periodic grids (not modelled; the axis is the infinite line), the layout tie-break.

GridTools/gt4py#2907 (read at 07a7f65e3, ADR 0031):

  • the counts live on the declaration and its ConnectivityRef; declarations compare, hash and are fingerprinted by it;
  • local dimensions are plain (no owner, sharers, counts or size=); DimensionKind.LOCAL stays and LocalDimensionIndex is a shorthand for it;
  • owner and sharers by nesting, and offset_tag; an adopted local dimension is keyed by the connectivity's own tag;
  • the checks where declarations meet (offset_provider_to_type, also through a module) and the structural agreement of tables over one local dimension;
  • the old design (owner, sharers, counts on the local dimension) is recorded as a rejected alternative.

The text for GridTools/gt4py#2910 and GridTools/gt4py#2912 is still the planned design; it will follow their code once they are re-implemented. index.md needs no change (same title and tags).

Small conflict expected with #38, which moves shared/dimensions-as-types.md and edits links in the main note.

🤖 Written by an agent on my behalf.

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