Lunderberg commented on code in PR #16655:
URL: https://github.com/apache/tvm/pull/16655#discussion_r1521716997
##########
src/tir/ir/tir_visitor_with_path.cc:
##########
@@ -199,12 +174,23 @@ void TIRVisitorWithPath::VisitStmt_(const LetStmtNode*
op, ObjectPath path) {
void TIRVisitorWithPath::VisitStmt_(const AttrStmtNode* op, ObjectPath path) {
Visit(op->value, path->Attr("value"));
- std::optional<DefContext<IterVar>> context = std::nullopt;
+ std::vector<std::variant<DefContext<IterVar>, DefContext<Var>>> context;
if (auto iter_var = op->node.as<IterVar>();
iter_var && (op->attr_key == attr::thread_extent || op->attr_key ==
attr::virtual_thread)) {
// Some attributes serve as a source of definition for the
// tir::Var they annotate.
- context = WithDef(iter_var.value(), path->Attr("node"));
+ context.push_back(WithDef(iter_var.value(), path->Attr("node")));
+ } else if (op->attr_key == attr::buffer_bind_scope) {
Review Comment:
Thank you, and added a comment with description.
--
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]