Conversation
egparedes
added this pull request to stack #2900
September 22, 2026 07:00
egparedes
force-pushed
the
connectivities-as-types-8-typed-positions
branch
from
September 23, 2026 16:10
65fa529 to
71d978f
Compare
egparedes
force-pushed
the
connectivities-as-types-8-typed-positions
branch
2 times, most recently
from
September 24, 2026 10:12
934c646 to
0238583
Compare
egparedes
removed this pull request from stack #2900
September 24, 2026 10:14
egparedes
changed the base branch from
connectivities-as-types-7-constlist-axisliteral
to
connectivities-as-types-6-class-keyed-providers
September 24, 2026 10:14
egparedes
added this pull request to stack #2917
September 24, 2026 10:14
egparedes
force-pushed
the
connectivities-as-types-8-typed-positions
branch
from
September 24, 2026 10:17
0238583 to
22aab76
Compare
This was referenced Sep 24, 2026
havogt
added a commit
to C2SM/icon4py
that referenced
this pull request
Sep 25, 2026
Temporary [tool.uv.sources] override to GridTools/gt4py#2912 at 22aab76b9, the last PR of stack #2917 (#2899 -> #2907 -> #2910 -> #2912). Pinned by rev, not branch, so a rebase of the stack cannot silently move what this is built against. Revert once the stack is released. The manifest `gt4py==` pins are left alone; a source override does not enforce them. gt4py pins `dace==2.0.0a9`, which moves dace from 2.0.0a7; nothing else in the resolution changes.
- MultiDimensionIndex survives pickle and copy (__getnewargs__); docstring says what it is and how it behaves under tuple operations - embedded domains reject axes that are not dimensions, pointing at gtx.resolve; the annotations say dimensions only - remove the unused get_ordered_indices; ADR 0029 wording on what stays string-keyed - drop the working plan document committed by mistake again
A position in a product needs at least one local index, and an owned local dimension must index the neighbors of the primary index's dimension. Tests for both, for an owner-less local axis, and for a direct 'SparseAxis' shift.
egparedes
force-pushed
the
connectivities-as-types-8-typed-positions
branch
from
October 2, 2026 02:14
22aab76 to
73339fd
Compare
This branch has not been deployed
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.
Stacked on #2910. Part 4 of 4 of the connectivities as types stack, and the last one (ADR 0030, updated here).
What
MultiDimensionIndex[D, *Ls](gt4py.next.MultiDimensionIndex): a position in the product of a primary dimension and local dimensions, e.g.MultiDimensionIndex(Vertex(3), V2E.Local(1)), the second neighbor of vertex 3. It is atuplesubclass, so it indexes a field or a neighbor table directly, compares and hashes like the plain tuple, and survivespickleandcopy. ATypeVarTuplecannot carry a bound, so the constructor checks the shape at runtime: one primary index followed by at least one local index, and an owned local dimension must index the neighbors of the primary index's dimension (MultiDimensionIndex(Edge(1), V2E.Local(1))is aTypeError, sinceV2E.domainisVertex).SparseTagis replaced by an explicitSparseAxis(dim)offset part, and the tag round trip (_dimension_to_tag) and theresolvecalls on sparse lookups are gone.Tests
MultiDimensionIndex: indexing a table, tuple equality and hash, pickling, rejected shapes. Plus a typing test of its revealed type and unpacking.Verification
Run locally (CPU) on this head; 0 failures in every row that ran:
test_next(internal, cpu, nomesh): embedded, roundtrip, gtfntest_next(dace, cpu, nomesh)src/gt4py/nextdoctests (in each session)test_typing_exports(mypy cases, pyright probes)pre-commit run --all-filesGitHub CI on the pushed head passes every check:
test_next(internal and dace; nomesh and atlas) on 3.12 and 3.14,test_cartesian,test_eve,test_storage, notebooks, package,typing-exportsand code quality. The local 3.13/3.14 runs were stopped in favour of CI.