-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control Flow Raising #1657
Control Flow Raising #1657
Conversation
3a6104f
to
02d53fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor changes, but some serious questions on the tests.
itvar, rng, _ = xform.loop_information() | ||
assert itvar == 'i' | ||
assert rng == (0, dace.symbol('N') - 1, 1) | ||
assert sdfg.apply_transformations(xform) == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is very weird because they are loops. We should discuss.
I wonder why this is not detected as a loop because the exiting state (latch->increment1
) should have the branch in this case and the latch itself is increment2
. This should count as a separate_latch=True
case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the easiest solution is just to run state fusion - then that state vanishes anyway and the loop is detected normally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still strange, maybe ok. We will see as it directly affects my frontend (my states cannot be fused afaik). Is it because of the graph patterns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR mainly provides control flow raising passes for the new intrinsic control flow constructs (Branches and loops) in SDFGs. In addition to raising, the state and control flow reachability passes have been adjusted to faithfully work with the intrinsic control flow constructs.
Along with the raising and reachability passes, a few important bugfixes and a general cleanup is included in the PR, but no other functionality is changed.