Conversation
egparedes
added this pull request to stack #2900
September 22, 2026 06:59
egparedes
force-pushed
the
connectivities-as-types-4-declare-connectivities
branch
from
September 23, 2026 16:09
83aad0c to
6de3f56
Compare
egparedes
force-pushed
the
connectivities-as-types-5-shared-locals-in-backends
branch
from
September 23, 2026 16:09
31d4ef9 to
65b6ef3
Compare
Reductions, sparse arguments and list materialization used to find a connectivity by the local dimension's tag, which only names the owner's table. They now look up a table over the local dimension (common.connectivity_key_over), so a connectivity sharing another one's local dimension works on every backend, bound on its own or together with its owner. DaCe sizes a connectivity array's local dimension from its own table. Lifts the PR 1 xfail markers.
- iterator tracing and embedded shift name a sharing connectivity by offset_tag - DaCe if/scan/concat_where/const-list sites find the table over the local dimension - connectivity_key_over takes a tag, avoids resolve, and picks deterministically - embedded map_list compares lists by local dimension, not by offset - a sharer must have its owner's origin; counts are compared one by one - ADR 0029: sharers must have the owner's neighbor structure
egparedes
force-pushed
the
connectivities-as-types-4-declare-connectivities
branch
from
September 23, 2026 16:54
6de3f56 to
7f1b5c8
Compare
egparedes
force-pushed
the
connectivities-as-types-5-shared-locals-in-backends
branch
from
September 23, 2026 16:54
65b6ef3 to
22b8382
Compare
egparedes
removed this pull request from stack #2900
September 24, 2026 10:14
Contributor
Author
|
Absorbed into #2907 (stack #2917): the backend support for connectivities sharing a local dimension now lands together with the declarations. |
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 #2908 (PR 4). Part 5 of the connectivities as types stack (ADR 0029).
What
#2907 lets a connectivity share another connectivity's local dimension, e.g. ICON4Py's flattened
C2CEindexing the same neighbor axis asC2E. The sharer is named in the IR by its own tag (offset_tag), because the local dimension's tag already names the owner's table. That brings back an offset tag that differs from its local dimension's tag, which PR 1's regression matrix had marked xfail on several backends. This PR makes all of them work.common.connectivity_key_over(provider, local_dim)finds the key of a bound table over a local dimension. That is the table keyed by the local dimension's tag (its owner's) if bound, and otherwise any table whose neighbor dimension it is (a sharer's).nd_array_field)unroll_reducemake_field, reductions with skip values, andmap_list_List(iterator embedded) records the connectivity it was built with. Writing a list back goes along that connectivity's local dimension, not a dimension named after the offset.sdfg_args.local_dimension_size). This fixes the DaCe shift through an offset whose tag differs from its local dimension.So a sharing connectivity works on every backend, whether it is bound alone or together with its owner.
Tests
test_neighbor_connectivity.py: shift and reduction through a shared local dimension, mixed with the owner's neighbors, and with the owner not bound at all. The owner and the sharer are bound to different tables, so using the wrong one fails.uses_offset_tag_differing_from_local_dimand…_in_reductionare removed together with their skip-list entries: every cell they marked passes now.Verification
unit + integration + regression: 6101 passed, 0 failed (
-n 2); pre-commit--all-filesclean.Deviation from the plan
The plan's PR 5 was "backends resolve connectivities through
Local.owner". PR 2 made one string name the offset, the local dimension and the provider key, and PR 6 keeps the internal provider keyed by tags, so going throughownerwould change nothing. What the backends actually lacked was a way to find a table over a local dimension when it isn't keyed by that dimension's tag.