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

dialects: (memref) Make alignment for memref.alloc optional #1052

Merged
merged 2 commits into from Jun 1, 2023

Conversation

AntonLydike
Copy link
Collaborator

@AntonLydike AntonLydike commented Jun 1, 2023

This seems to also be the case for mlir, so we don't actually need it

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (4343a8f) 87.09% compared to head (ee44e90) 87.09%.

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           
Impacted Files Coverage Δ
xdsl/dialects/memref.py 82.02% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@PapyChacal PapyChacal left a 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?

@AntonLydike
Copy link
Collaborator Author

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={
Copy link
Contributor

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?

@PapyChacal PapyChacal added the dialects Changes on the dialects label Jun 1, 2023
@AntonLydike AntonLydike merged commit 546d604 into main Jun 1, 2023
12 checks passed
@AntonLydike AntonLydike deleted the anton/memref-alloc-align-optional branch June 1, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants