yzh119 commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1126682172
##########
src/tir/transforms/split_host_device.cc:
##########
@@ -104,44 +81,42 @@ class VarUseDefAnalysis : public StmtExprMutator {
dyn_shmem_size_ = dyn_shmem_size_ * (op->dtype.bytes());
use_dyn_shmem_ = true;
}
- return StmtExprMutator::VisitStmt_(op);
+ StmtVisitor::VisitStmt_(op);
}
- Stmt VisitStmt_(const AllocateConstNode* op) final {
- this->HandleDef(op->buffer_var.get());
- return StmtExprMutator::VisitStmt_(op);
- }
+ // recording what thread axis have been visited.
+ std::unordered_set<const IterVarNode*> defined_thread;
+};
- Stmt VisitStmt_(const StoreNode* op) final {
- LOG(FATAL) << "Unexpected use of deprecated StoreNode. Please use
BufferStoreNode instead.";
- }
+/*!
+ * \brief Mutator class to remove unrefenced let stmt/expressions.
+ * \param use_count The pre-computed variable to use count map.
+ */
+class UnreferencedLetRemover : public StmtExprMutator {
Review Comment:
Thank you for your review! I have updated the code according to your
suggestions.
--
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]