fix[next-dace]: Map stride of local dimension in nested SDFG#2593
Conversation
philip-paul-mueller
left a comment
There was a problem hiding this comment.
I am not fully happy with this change because it has potentially big implication for the IfMover and the condition fuser (which will stop working, since it can no longer identifying which If-Blocks can be moved together.
Because of these implication we must absolutely make sure to also run MuPhys, because, it will be very much impacted by these changes.
I am actually not sure if the data locality is actually improved, because in the almost everything has a restrict keyword, so the compiler should be smart enough tio figuring that out.
But this is just my concern or have you different opinions @iomaganaris
I see your point, makes sense. This change is not part of the bugfix, so I could revert it. |
cb60549 to
f560107
Compare
|
I have applied the review comments from @philip-paul-mueller, I agree totally. I have reverted the modification to the lowering of the condition: this change introduced a performance regression. Below the blueline performance plot:
|
philip-paul-mueller
left a comment
There was a problem hiding this comment.
LGTM, although I have two smallish points.
| if param_name in if_sdfg.arrays: | ||
| if param_name in sdfg.arrays: | ||
| # the data desciptor was added by the visitor of the other branch expression | ||
| assert if_sdfg.data(param_name) == inner_desc | ||
| assert sdfg.data(param_name) == inner_desc | ||
| else: | ||
| if_sdfg.add_datadesc(param_name, inner_desc) | ||
| if_sdfg_input_memlets[param_name] = arg_expr | ||
| sdfg.add_datadesc(param_name, inner_desc) | ||
| input_memlets[param_name] = arg_expr |
There was a problem hiding this comment.
Question: If this function is called in a uniform way I would expect that the data descriptor is either already added to the sdfg or not in all cases. So this if locks a bit fishy to me but maybe I miss something.
There was a problem hiding this comment.
The origin of this if is that I am adding globals as I encounter them while visiting the if branches. I am visiting one branch at a time, so it could be that some globals have already been added in the previous branch.

This PR contains 3 kinds of changes:
Addition of connectivities. This is needed to support the pattern with
can_derefexpressions (not part of this PR, see feat[next-dace]: Lowering mixed-GTIR to SDFG #2467). After GTIR transformations, which unroll the neighbors loops, a common pattern in grids with skip values isif(can_deref(a, V2E), deref(a(V2E)) + 2, 0).Renaming of function parameters.
Blueline performance is in pair with baseline.