-
Notifications
You must be signed in to change notification settings - Fork 147
Add connector dealiasing #2161
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
base: main
Are you sure you want to change the base?
Add connector dealiasing #2161
Conversation
dace/sdfg/dealias.py
Outdated
| Args: | ||
| sdfg (dace.SDFG): Modified in-place. | ||
| """ | ||
| recurse_in: Set[dace.nodes.NestedSDFG] = set() |
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.
should the function run recursively?
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 yes, if nested SDFG has more nested SDFGs the function should just continue doing?
dace/sdfg/dealias.py
Outdated
| return candidate_name | ||
|
|
||
|
|
||
| def dealias(sdfg: dace.SDFG): |
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.
maybe find a better name such as make_unique_nested_data or something
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 of the name def find_readable_connector_names_for_nested_sdfgs(sdfg: dace.SDFG): what do you think?
dace/sdfg/dealias.py
Outdated
| return candidate_name | ||
| else: | ||
| i = 1 | ||
| candidate_name = f"{edge.data.data}_{SLICE_SUFFIX}_{i}" |
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.
actually, you can also use data.find_new_name(f'{edge.data.data}_{SLICE_SUFFIX}') to get A_slice followed by A_slice_#
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 will use find_new_name and remove FULLVIEW_SUFFIX
Nice NSDFG connector names:

This:
Becomes:
