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: (memref) Make alignment for memref.alloc optional #1052
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1052 +/- ##
=======================================
Coverage 87.09% 87.09%
=======================================
Files 127 127
Lines 19612 19612
Branches 2971 2971
=======================================
Hits 17082 17082
Misses 2023 2023
Partials 507 507
☔ 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.
Is there an interop test already?
Yep, there is! |
shape: Optional[Iterable[int | AnyIntegerAttr]] = None, | ||
) -> Alloc: | ||
if shape is None: | ||
shape = [1] | ||
return Alloc.build( | ||
operands=[[], []], | ||
result_types=[MemRefType.from_element_type_and_shape(return_type, shape)], | ||
attributes={"alignment": IntegerAttr.from_int_and_width(alignment, 64)}, | ||
attributes={ |
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.
nitpicking: I think it would be more readable with if outside?
This seems to also be the case for mlir, so we don't actually need it