Skip to content

Update GT4Py/DaCe to get "Debug Backend" and "Schedule Tree Bridge"#170

Merged
romanc merged 27 commits intodevelopfrom
feature/oir_stree_sdfg_bridge
Jul 29, 2025
Merged

Update GT4Py/DaCe to get "Debug Backend" and "Schedule Tree Bridge"#170
romanc merged 27 commits intodevelopfrom
feature/oir_stree_sdfg_bridge

Conversation

@romanc
Copy link
Collaborator

@romanc romanc commented Jun 19, 2025

Description

PR GridTools/gt4py#2067 in GT4Py fundamentally changed how the dace:* backends behave. In that PR, we changed the strategy to make use of an upcoming DaCe feature called "Schedule Tree", which we will use for optimization purposes. This new "bridge" between GT4Py and DaCe, allows for a much cleaner design where both packages handle nothing more than what they need to. A drop in performance is to be expected (especially on CPU) as we have deactivated local caching for now. But the very next task is to re-use this new platform to allow for much more improved and aggressive merging capacities, local caching and hardware-driven tiling.

This PR updates GT4Py to a version that includes the above mentioned "Schedule tree bridge" and removes NDSL-level optimizations in the orchestration pipeline. As said, this will come with a temporary dip in performance, which we plan to restore with upcoming pull requests.

The GT4Py update in this PR also includes the "Debug Backend". A plain python backend, useful for prototyping of new DSL features and (to some extent) debugging. The "Debug Backend" was designed for readability and is glacially slow for real-world sized problems. Don't try to run anything large with this backend.

In addition to updating the GT4Py and DaCe versions, we include the following two changes in this PR

  1. Expose compiler optimization level as GT4PY_COMPILE_OPT_LEVEL, defaults to 3 as before.
  2. Minor change in import style in ndsl/dsl/dace/orchestration.py.

How Has This Been Tested?

CI is green. Additional local testing with PyFV3 translate tests and the AI2 data.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation: N/A
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included: N/A

FlorianDeconinck and others added 27 commits June 18, 2025 16:08
Remove un-needed passes in pipeline
Point the submodules to oir->stree->sdfg branches in gt4py and dace.
This allows to run NDSL tests against these branches.
splittable regions were based on StencilComputation library nodes that
don't exist anymore since we torched the old bridge. To be
re-implemented at the stree level (if we still want to keep it).
dace -> Move main visitor out and remove print statements
gt4py -> Update DaCe version (remove debug print statements)
- dace: include Phil's fix to cycle detection
- gt4py: update dace dependency and fix cpu memory layout
- dace: fix write access caching
- gt4py: DDE issue to be investigated
- dace: patch DDE not to attempt to inline pointers
- gt4py: re-enable DDE
@romanc romanc marked this pull request as ready for review July 28, 2025 07:06
@romanc romanc requested review from fmalatino and twicki July 28, 2025 07:06
@romanc romanc changed the title WIP: feature/oir stree sdfg bridge Update GT4Py/DaCe to get "Schedule Tree Bridge" Jul 28, 2025
Copy link
Collaborator

@twicki twicki left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the update

@romanc romanc merged commit e80b4f2 into develop Jul 29, 2025
5 checks passed
@romanc romanc deleted the feature/oir_stree_sdfg_bridge branch July 29, 2025 07:19
@romanc romanc restored the feature/oir_stree_sdfg_bridge branch July 29, 2025 07:19
@romanc romanc changed the title Update GT4Py/DaCe to get "Schedule Tree Bridge" Update GT4Py/DaCe to get "Debug Backend" and "Schedule Tree Bridge" Jul 29, 2025
jjuyeonkim pushed a commit to jjuyeonkim/NDSL that referenced this pull request Sep 8, 2025
PR GridTools/gt4py#2067 in GT4Py fundamentally changed how the `dace:*` backends behave. In that PR, we changed the strategy to make use of an upcoming DaCe feature called "Schedule Tree", which we will use for optimization purposes. This new "bridge" between GT4Py and DaCe, allows for a much cleaner design where both packages handle nothing more than what they need to. A drop in performance is to be expected (especially on CPU) as we have deactivated local caching for now. But the very next task is to re-use this new platform to allow for much more improved and aggressive merging capacities, local caching and hardware-driven tiling.

This PR updates GT4Py to a version that includes the above mentioned "Schedule tree bridge" and removes NDSL-level optimizations in the orchestration pipeline. As said, this will come with a temporary dip in performance, which we plan to restore with upcoming pull requests.

In addition to updating the GT4Py and DaCe versions, we include the following two changes in this PR

1. Expose compiler optimization level as `GT4PY_COMPILE_OPT_LEVEL`, defaults to `3` as before.
2. Minor change in import style in `ndsl/dsl/dace/orchestration.py`.

---------

Co-authored-by: Florian Deconinck <deconinck.florian@gmail.com>
Co-authored-by: Roman Cattaneo <1116746+romanc@users.noreply.github.com>
@romanc romanc deleted the feature/oir_stree_sdfg_bridge branch September 23, 2025 07:36
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