slyubomirsky commented on code in PR #16655:
URL: https://github.com/apache/tvm/pull/16655#discussion_r1522063532
##########
src/tir/ir/tir_visitor_with_path.cc:
##########
@@ -195,6 +204,10 @@ void TIRVisitorWithPath::VisitStmt_(const AttrStmtNode*
op, ObjectPath path) {
Visit(expr.value(), path->Attr("node"));
}
Visit(op->body, path->Attr("body"));
+
+ while (context.size()) {
Review Comment:
Thanks for the change. It's probably worth also putting in a comment that
this is to ensure that the defs expire, otherwise it seems like spooky action
at a distance. Not 100% sure, as DefContext does imply that it's an RAII sort
of thing.
##########
src/tir/ir/tir_visitor_with_path.cc:
##########
@@ -195,6 +204,10 @@ void TIRVisitorWithPath::VisitStmt_(const AttrStmtNode*
op, ObjectPath path) {
Visit(expr.value(), path->Attr("node"));
}
Visit(op->body, path->Attr("body"));
+
+ while (context.size()) {
Review Comment:
Thanks for the change. It's probably worth also putting in a comment that
this is to ensure that the defs expire, otherwise it seems like spooky action
at a distance. Not 100% sure, as the name "DefContext" does imply that it's an
RAII sort of thing.
--
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]