feat[next-dace]: Updated MoveDataflowIntoIfBody#2531
Open
philip-paul-mueller wants to merge 39 commits intoGridTools:mainfrom
Open
feat[next-dace]: Updated MoveDataflowIntoIfBody#2531philip-paul-mueller wants to merge 39 commits intoGridTools:mainfrom
MoveDataflowIntoIfBody#2531philip-paul-mueller wants to merge 39 commits intoGridTools:mainfrom
Conversation
Co-authored-by: Philip Müller <philip.mueller@cscs.ch>
Took me long enough.
…er one, which is good.
Implemented a better sorting mechanism and also handled one case of empty Memlets, however, not all are handled yet.
MoveDataflowIntoIfBodyMoveDataflowIntoIfBody
edopao
reviewed
Apr 13, 2026
| assert if_block_spec is not None | ||
| enclosing_map = graph.scope_dict()[if_block] | ||
| relocatable_connectors, non_relocatable_connectors, connector_usage_location = ( | ||
| self._partition_if_block(sdfg, if_block) # type: ignore[misc] # Guaranteed to be not None. |
Contributor
There was a problem hiding this comment.
I would use an assert, since it is a prerequisite of this function call, instead of type ignore.
Contributor
Author
There was a problem hiding this comment.
The problem is that the return value is the issue.
Thus one would need:
partion_result = self._partition_if_block()
assert partion_result is not None
el1, el2, el3 = partion_resultHowever, this looks rely strange to me.
I do that in _has_if_block_relocatable_dataflow() but there it is part of a test that actually uses the None return value.
Contributor
There was a problem hiding this comment.
Yes, I meant the check on the return value as you posted. Why does it look strange to you?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates
MoveDataflowIntoIfBodytransformation.It addresses some aspects that were not fully addressed in a previous PR.
The main change is that now the processing is not done in a per connector fashion but is performed in a unified way, i.e. all at once.
Furthermore, the stability was increased, by ordering the nodes to relocate according to their node id.
TODO: