Skip to content

[mlir][Bufferization] castOrReallocMemRefValue: Use BufferizationOptions (FXML-4352) #166

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

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

mgehre-amd
Copy link
Collaborator

This allows to configure both the op used for allocation and copy of memrefs.
It also changes the default behavior because the default allocation in BufferizationOptions creates memref.alloc with alignment = 64 where we used to create memref.alloca without any alignment before.

@mgehre-amd mgehre-amd changed the title [mlir][Bufferization] castOrReallocMemRefValue: Use BufferizationOptions [mlir][Bufferization] castOrReallocMemRefValue: Use BufferizationOptions (FXML-4352) Apr 16, 2024
Copy link
Collaborator

@cferry-AMD cferry-AMD left a comment

Choose a reason for hiding this comment

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

If I understand well, by adding the options to castOrReallocMemRefValue, this PR lets us specify the way to do memory allocation/copy. This looks good to me, but I'm not knowledgeable enough on bufferization to have a strong opinion.

Copy link

@TinaAMD TinaAMD left a comment

Choose a reason for hiding this comment

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

Nice fix!

@mgehre-amd mgehre-amd requested a review from cferry-AMD April 18, 2024 06:51
@mgehre-amd mgehre-amd merged commit da2c0b9 into feature/fused-ops Apr 18, 2024
@mgehre-amd mgehre-amd deleted the matthias.bufferize_realloc branch April 18, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants