Skip to content
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

Various Cutout Fixes #1662

Merged
merged 7 commits into from
Nov 4, 2024
Merged

Various Cutout Fixes #1662

merged 7 commits into from
Nov 4, 2024

Conversation

phschaad
Copy link
Collaborator

@phschaad phschaad commented Sep 19, 2024

  • Fix cutouts w.r.t. the use of UIDs, allowing them to be preserved or re-generated depending on an input parameter
  • Fix singlestate cutout extraction when memlets access struct members.

@phschaad phschaad changed the title Adjust cutouts to new UUIDs Various Cutout Fixes Oct 31, 2024
@phschaad phschaad marked this pull request as ready for review October 31, 2024 16:16
@phschaad phschaad requested a review from tbennun October 31, 2024 16:17
@phschaad phschaad added this to the 1.0 milestone Oct 31, 2024
@phschaad phschaad added the bug Something isn't working label Oct 31, 2024
Copy link
Collaborator

@tbennun tbennun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the new clone methods, is there any other way? Also, see comments

dace/sdfg/analysis/cutout.py Show resolved Hide resolved
:param override_start_block: If set, explicitly force a given control flow block to be the start block. If left
None (default), the start block is automatically determined based on domination
relationships in the original graph.
:return: The created SDFGCutout or the original SDFG where no smaller cutout could be obtained.
"""
create_element = copy.deepcopy
def create_element(x: Union[ControlFlowBlock, InterstateEdge]) -> Union[ControlFlowBlock, InterstateEdge]:
return x.clone(keep_guid=preserve_guids)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use an inline lambda, it's much cleaner

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After removing the clone function I believe it is cleaner this way since this way provides type information, while lambdas completely remove the ability to type hint things (cleanly)

dace/sdfg/analysis/cutout.py Show resolved Hide resolved
@phschaad phschaad requested a review from tbennun November 4, 2024 09:25
@phschaad phschaad added this pull request to the merge queue Nov 4, 2024
Merged via the queue into main with commit b27024b Nov 4, 2024
10 checks passed
@phschaad phschaad deleted the users/phschaad/cutout_changes branch November 4, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants