Lunderberg commented on a change in pull request #9727:
URL: https://github.com/apache/tvm/pull/9727#discussion_r807371988
##########
File path: src/tir/transforms/split_host_device.cc
##########
@@ -155,10 +160,27 @@ class VarUseDefAnalysis : public StmtExprMutator {
}
PrimExpr VisitExpr_(const LoadNode* op) final {
- this->HandleUse(op->buffer_var);
+ LOG(FATAL) << "Unexpected use of deprecated LoadNode. Please use
BufferLoadNode instead.";
+ return PrimExpr();
+ }
+
+ PrimExpr VisitExpr_(const BufferLoadNode* op) final {
+ this->HandleUse(op->buffer->data);
return StmtExprMutator::VisitExpr_(op);
}
+ void VisitBuffer(Buffer buffer) {
+ this->HandleUse(buffer->data);
+ auto visit_arr = [&](Array<PrimExpr> arr) {
+ for (const auto& element : arr) {
+ this->VisitExpr(element);
+ }
+ };
+
+ visit_arr(buffer->shape);
+ visit_arr(buffer->strides);
+ }
+
Review comment:
Thank you, I should have used it from the BufferStore/BufferLoad
visitors, which I've now corrected.
--
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]