-
Notifications
You must be signed in to change notification settings - Fork 5
[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
Conversation
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.
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.
mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize.mlir
Outdated
Show resolved
Hide resolved
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.
Nice fix!
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
createsmemref.alloc
withalignment = 64
where we used to creatememref.alloca
without any alignment before.