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

backend: (csl) Add printing for CSL dialect ops #2593

Merged
merged 10 commits into from
May 15, 2024
Merged

Conversation

AntonLydike
Copy link
Collaborator

This PR adds printing for the CSL dialect operations (stacked on top of #2591)

@AntonLydike AntonLydike added the backend Compiler backend in xDSL label May 15, 2024
@AntonLydike AntonLydike requested review from superlopuh and dk949 May 15, 2024 09:55
@AntonLydike AntonLydike self-assigned this May 15, 2024
@AntonLydike AntonLydike changed the base branch from main to anton/csl-dialect-1 May 15, 2024 09:57
Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.64%. Comparing base (b10f609) to head (b310f07).

Additional details and impacted files
@@                   Coverage Diff                   @@
##           anton/csl-dialect-1    #2593      +/-   ##
=======================================================
- Coverage                89.65%   89.64%   -0.01%     
=======================================================
  Files                      358      358              
  Lines                    45325    45353      +28     
  Branches                  6815     6826      +11     
=======================================================
+ Hits                     40634    40655      +21     
- Misses                    3663     3666       +3     
- Partials                  1028     1032       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from anton/csl-dialect-1 to main May 15, 2024 10:33

def _get_variable_name_for(self, val: SSAValue) -> str:
def _get_variable_name_for(self, val: SSAValue, hint: str | None = None) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure how much we want to rely on name hints for naming variables in the output, especially now that we mess with them at parsing time, like stripping _0, _1, ... suffixes. The two alternatives that come to mind is either a custom type for variables or an attribute on ops that own the variables. The second seems vaguely preferable. I don't want to derail your csl mergeathon too much, but if you agree that not relying on name hints is a good change in the future, it would be great to file a PR and mention it in a comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, not sure how we want to continue to go on with name hints from here. I'd see how it evolves over time, maybe we don't actually need readable CSL (the official examples don't seem to bother too much with that either).

@AntonLydike AntonLydike merged commit 07266fc into main May 15, 2024
9 checks passed
@AntonLydike AntonLydike deleted the anton/csl-dialect-2 branch May 15, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Compiler backend in xDSL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants