Lunderberg commented on code in PR #16655:
URL: https://github.com/apache/tvm/pull/16655#discussion_r1521728448
##########
src/tir/ir/tir_visitor_with_path.cc:
##########
@@ -250,7 +236,8 @@ void TIRVisitorWithPath::VisitStmt_(const BufferStoreNode*
op, ObjectPath path)
void TIRVisitorWithPath::VisitStmt_(const BufferRealizeNode* op, ObjectPath
path) {
Visit(op->condition, path->Attr("condition"));
Visit(op->bounds, path->Attr("bounds"));
- auto context = WithDef(op->buffer, path->Attr("buffer"));
+ auto context = WithDefIfUndefined(op->buffer->data,
path->Attr("buffer")->Attr("data"));
Review Comment:
That's correct. In cases where the buffer's backing allocation is defined
externally, the `BufferRealize` is an annotation of the bounds where the
external buffer is accessed. Otherwise, `BufferRealize` is an allocation.
Prior to this commit, only the external backing allocation was handled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]