Skip to content

fix[next-dace]: Update connectivities in fastcall#2449

Merged
edopao merged 8 commits intoGridTools:mainfrom
edopao:dace_update_connectivities_in_fastcall
Jan 21, 2026
Merged

fix[next-dace]: Update connectivities in fastcall#2449
edopao merged 8 commits intoGridTools:mainfrom
edopao:dace_update_connectivities_in_fastcall

Conversation

@edopao
Copy link
Copy Markdown
Contributor

@edopao edopao commented Jan 19, 2026

Update the connectivity arrays in SDFG fastcall. In baseline, the connectivity arrays were only set on the first call and then were not updated, because they were assumed to not change during application lifetime. Although this assumption is true in general, it does not hold in some specific cases. During MPI tests in ICON4Py (#692), for example, it was observed that connectivity arrays get reallocated during a test session, because the default scope of some fixtures is function-level. For this reason, and also to align the runtime behavior of DaCe backend with GTFN, this PR always sets the connectivity arrays at each program call.

Copy link
Copy Markdown
Contributor

@philip-paul-mueller philip-paul-mueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good I have some very minor comments, nothing blocking.
However, I still think that the assumption "everything is allocated once" is a good assumption especially for the grid.
So I would suggest to add some configuration option like STATIC_ALLOCATED_GRIDS or GRID_LIFETIME=global.
However, I am also fine with a TODO.

Comment thread src/gt4py/next/program_processors/runners/dace/workflow/bindings.py Outdated
Comment thread src/gt4py/next/program_processors/runners/dace/workflow/bindings.py Outdated
@edopao
Copy link
Copy Markdown
Contributor Author

edopao commented Jan 20, 2026

I think it looks good I have some very minor comments, nothing blocking. However, I still think that the assumption "everything is allocated once" is a good assumption especially for the grid. So I would suggest to add some configuration option like STATIC_ALLOCATED_GRIDS or GRID_LIFETIME=global. However, I am also fine with a TODO.

Thanks for the review. I agree about being able to configure the behavior, I have added a config variable.

@edopao edopao marked this pull request as ready for review January 20, 2026 08:19
Comment thread src/gt4py/next/config.py Outdated
Comment thread src/gt4py/next/config.py Outdated
@edopao edopao requested a review from havogt January 20, 2026 12:44
@edopao
Copy link
Copy Markdown
Contributor Author

edopao commented Jan 20, 2026

The AMD CI-pipeline fails because of vCluster issues.

Copy link
Copy Markdown
Contributor

@philip-paul-mueller philip-paul-mueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@edopao edopao merged commit badbc3d into GridTools:main Jan 21, 2026
22 of 23 checks passed
@edopao edopao deleted the dace_update_connectivities_in_fastcall branch January 21, 2026 07:20
@edopao edopao mentioned this pull request Jan 21, 2026
msimberg pushed a commit to msimberg/gt4py that referenced this pull request Jan 21, 2026
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.

3 participants