Skip to content

[stree] stree to SDFG fixes from NASA branch#2420

Open
romanc wants to merge 6 commits into
spcl:mainfrom
romanc:romanc/stree-to-sdfg-fixes
Open

[stree] stree to SDFG fixes from NASA branch#2420
romanc wants to merge 6 commits into
spcl:mainfrom
romanc:romanc/stree-to-sdfg-fixes

Conversation

@romanc

@romanc romanc commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR brings back a couple of stree -> SDFG fixes from the NASA working branch #2364, which accumulated a bunch of changes last month. In particular, this PR contains

  1. consider scalar memlets e.g. when collecting memlets of conditions. our use-case is a conditional inside a triple-nested loop where the conditional depends on a scalar condition that is calculated outside the loop (see test case).
  2. connect all source / sink nodes inside a map with empty memlets to the corresponding entry / exit node of the containing map (e.g. see image below of what was wrong before)
  3. proper support for (self-assigning) copy nodes
  4. ensure unique names of added loop regions (this is enforced by validation)

Support for collecting scalar memlets bleeds out into sdfg.py and state.py. All changes there (outside the schedule tree world) are fully backwards compatible.


problematic stree -> sdfg transformation before fix number 2

image

romanc added 6 commits July 2, 2026 10:26
make sure to be backwards compatible
Names/Labels of LoopRegions need to be unique inside the CFG (validation
checks that). So far, we didn't have problems. However, with "no
simplify before stree", we are getting in places where this is an issue.

This commit deploys a simple fix to ensure unique names of LoopRegions.
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