-
Notifications
You must be signed in to change notification settings - Fork 45
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
[Region] Bufferize with one-shot-bufferize #973
Conversation
if (noTensorsIn(envOp.getArgs()) && noTensorsIn(envOp.getResults())) { | ||
// Nothing to do. | ||
return ::mlir::success(); | ||
} |
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 this needed? the docs say
This method will never be called on ops that do not have at least one
tensor operand/result.
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.
Agreed, this is not needed.
bool bufferizesToMemoryRead( | ||
::mlir::Operation *op, ::mlir::OpOperand &opOperand, | ||
const ::mlir::bufferization::AnalysisState &state) const { | ||
return true; |
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.
what is it reading?
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.
This implementation follows scf.yield
op bufferization: read is true, write is false etc.
48fd9b8
to
e4bdcbb
Compare
Please review these guidelines to help with the review process: