-
Notifications
You must be signed in to change notification settings - Fork 77
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
dialects: (stablehlo) add stablehlo.dot #3090
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3090 +/- ##
=======================================
Coverage 89.90% 89.90%
=======================================
Files 421 421
Lines 53264 53306 +42
Branches 8257 8263 +6
=======================================
+ Hits 47885 47927 +42
Misses 4041 4041
Partials 1338 1338 ☔ View full report in Codecov by Sentry. |
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.
Small stylistic nits.
xdsl/dialects/stablehlo.py
Outdated
with printer.in_angle_brackets(): | ||
with printer.indented(): | ||
printer.print_string("\nlhs_batching_dimensions = [") | ||
printer.print_list( |
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.
Does directly printing the ArrayAttr
not work here?
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.
It wants to print the types for each int, I'll look into a more elegant way of doing this
printer.print_string(f"\n{name} = [") | ||
printer.print_list( | ||
value.data, | ||
lambda dim: printer.print_string(f"{dim.value.data}"), |
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.
lambda dim: printer.print_string(f"{dim.value.data}"), | |
lambda dim: printer.print(dim.value.data), |
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.
Can ignore this if you want
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 actually prefer print_string to print, which is unfortunately pretty slow right now
This is the attribute used to specify along which dimensions the dot products happen.
CC @efferifick