Skip to content

Development setup and early work for a Schedule Tree Optimizer Pipeline#189

Merged
FlorianDeconinck merged 53 commits into
developfrom
nasa/milestone2
Oct 24, 2025
Merged

Development setup and early work for a Schedule Tree Optimizer Pipeline#189
FlorianDeconinck merged 53 commits into
developfrom
nasa/milestone2

Conversation

@romanc
Copy link
Copy Markdown
Collaborator

@romanc romanc commented Aug 4, 2025

Ante Scriptum: this branch was the workhorse for NASA's M2 work. All features were individually merged, except this one.

Description

This branch brings the setup to run the Schedule Tree pipeline (SDFG -> STREE -> SDFG) and lays the foundation for a pipeline.

A first, partially working, AxisMerge optimization pass is available.

All of this code is for backend developer only and is deactivated by default. #HereBeDragons

How Has This Been Tested?

Basic test have been implemented covering the easiest

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
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

This branch is what we use for the NASA team as we start to prepare for
Milestone 2.

Currently uses the following versions of externals:

- GT4Py: follows "milestone2" branch on Roman's fork
- DaCe: whatever GT4Py's uv.lock file says about dace-cartesian
Roman Cattaneo and others added 19 commits August 5, 2025 08:35
This commit updates GT4Py to add support for the experimental features
"absolute k indexing" and "expose current k-level" in the debug backend.
* Roundtrip sdfg -> stree -> sdfg in orchestration
   with moaar validation
* Remove debug prints and intermediate sdfg saving
* Use default when calling simplify
* Update gt4py/dace submodules (roundtrip work)
   This commit brings the changes needed for stree rountrips to validate
   with the AI2 data (in the PyFV3 translate tests).
* Update README
* Quick note: skip ScalarToSymbolPromotion for now
   The pass messes up previously valid & validating SDFGs. We can live
   (performance wise) without it for the current milestone. Let's
   re-evaluate once we get back to DaCe mainline (v2).
* Update gt4py & dace submodules (stree/rountrip)
… MPI inplace all_reduce calls. Note that device_synchronize is Cupy/CUDA specific at the moment.
Add support for fields with data_dims (or data_dims only fields) in the
stencil wrapper's function to computae field origins.
Add a non-trival test case for orchestrating tables. This is a
mitigation for a gt4py-orchestration-issue that is easiest reproduced
from NDSL (compared to a adding a test in gt4py directly).
Cherry-picking (parts of) PR #211
into the milestone2 branch.
This gt4py update includes

- tests for the memlet dimension fix
- another fix to ensure that we always define all three cartesian
  symbols (even if we are only passing 2d fields and scalars into the
  stencil).
@FlorianDeconinck FlorianDeconinck changed the title Do not merge: working branch for milestone 2 of NASA team Development setup and early work for a Schedule Tree Optimizer Pipeline Oct 23, 2025
@FlorianDeconinck FlorianDeconinck marked this pull request as ready for review October 23, 2025 15:04
Copy link
Copy Markdown
Collaborator

@FlorianDeconinck FlorianDeconinck 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 we are ready for show

Copy link
Copy Markdown
Collaborator Author

@romanc romanc left a comment

Choose a reason for hiding this comment

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

This looks great! Really just nitpicks inline. Feel free to discard if you don't feel like.

Regarding (in code) question of how to test all of this: I think we'll need to build tooling for this. Either by exposing more things, e.g.

code = MyOrchestratedCode(stencil_factory)
code._debug.sdfg   # access to the (last) sdfg
code._debug.strees  # list of strees in the sdfg

or by tooling the test system to abstract away the ugliness of "running orchestration by hand". Of course both approaches bring a bunch of questions

If we push the question for a couple month, we might be able to leverage a potential test system that DaCe would expose for its users. You know, like we expose the translate test system from NDSL (just not so ugly). We might need to write such a "DaCe test system for stree transformations" ourselves, but it might be easier to test at that level.

Comment thread ndsl/dsl/dace/stree/optimizations/axis_merge.py Outdated
Comment thread ndsl/dsl/dace/stree/optimizations/axis_merge.py Outdated
Comment thread ndsl/dsl/dace/stree/optimizations/axis_merge.py Outdated
Comment thread ndsl/dsl/dace/stree/optimizations/axis_merge.py Outdated
Comment thread ndsl/dsl/dace/stree/optimizations/axis_merge.py Outdated
Comment thread ndsl/dsl/dace/stree/optimizations/axis_merge.py Outdated
Comment thread ndsl/dsl/dace/stree/optimizations/axis_merge.py
Comment thread ndsl/dsl/dace/stree/optimizations/axis_merge.py Outdated
Copy link
Copy Markdown
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 ready to merge!

@FlorianDeconinck FlorianDeconinck added this pull request to the merge queue Oct 24, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 24, 2025
@FlorianDeconinck FlorianDeconinck added this pull request to the merge queue Oct 24, 2025
@FlorianDeconinck FlorianDeconinck added the Performance Performance related tasks & PR label Oct 24, 2025
Merged via the queue into develop with commit 32672fc Oct 24, 2025
6 checks passed
@romanc romanc deleted the nasa/milestone2 branch October 27, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Performance Performance related tasks & PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants