Skip to content

refactor[cartesian]: convert legacy nested sdfgs before inlining - #2954

Closed
romanc wants to merge 1 commit into
GridTools:mainfrom
romanc:romanc/no-view-nested-sdfg
Closed

romanc wants to merge 1 commit into
GridTools:mainfrom
romanc:romanc/no-view-nested-sdfg

Conversation

@romanc

@romanc romanc commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Description

This PR brings the contents of dace's ci/pyfv3_legacy_nested_sdfgs.py from the DaCe CI "down" into gt4py.

Under the "no-view SDFG" contract, SDFGs must be "no view" before calling either simplify() or inline_sdfgs(). Both functions expect new-style nested SDFGs.

convert_legacy_nested_sdfgs() does the convertion automatically and skips SDFGs that are already conforming to the new rules.

The extra script in the DaCe CI can be removed once all of the following conditions are met:

We should probably update freeze_origin_domain_sdfg() to not rely on convert_legacy_nested_sdfgs() in the long run. For now, this should do and is a lot nicer than DaCe's CI injecting the extra function call when needed.

Requirements

  • All fixes and/or new features come with corresponding tests.
  • Important design decisions have been documented in the appropriate ADR inside the docs/development/ADRs/ folder.

This PR brings the contents of
`https://github.com/spcl/dace/blob/main/ci/pyfv3_legacy_nested_sdfgs.py`
from the DaCe CI "down" into gt4py.

Under the "no-view SDFG" contract, SDFGs must be "no view" before
calling either `simplify()` or `inline_sdfgs()`. Both functions expect
new-style nested SDFGs.

`convert_legacy_nested_sdfgs()` does the convertion automatically and
skips SDFGs that are already conforming to the new rules.

The extra script in the DaCe CI can be removed once all of the following
conditions are met:

- This PR is merged.
- GT4Py has been updated to use DaCe 2.0 beta 1
  PR: GridTools#2937
- Both changes made it to NDSL,
- NDSL was released and that release was picked up by pyFV3
@romanc
romanc requested review from FlorianDeconinck and removed request for FlorianDeconinck October 27, 2026 15:53
@romanc
romanc marked this pull request as draft October 27, 2026 15:56
@romanc

romanc commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

nevermind, convert_legacy_nested_sdfgs() is only available after the DaCe update, i.e. this PR is blocked by #2937.

@romanc

romanc commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #2937, which now contains the changes from this PR.

@romanc romanc closed this Oct 27, 2026
@romanc
romanc deleted the romanc/no-view-nested-sdfg branch October 27, 2026 18:38
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