zhiics commented on a change in pull request #7374:
URL: https://github.com/apache/tvm/pull/7374#discussion_r568342734
##########
File path: src/relay/transforms/type_infer.cc
##########
@@ -603,7 +611,21 @@ class TypeInferencer::Resolver : public MixedModeMutator,
PatternMutator {
Expr Rewrite_(const CallNode* op, const Expr& post) final { return
AttachCheckedType(op, post); }
- Expr VisitExpr_(const LetNode* op) final { return AttachCheckedType(op); }
+ Expr VisitExpr_(const LetNode* op) final {
+ auto pre_visit = [this](const LetNode* op) {
+ this->VisitExpr(op->var);
+ this->VisitExpr(op->value);
+ };
+ auto post_visit = [this](const LetNode* op) {
+ Expr expr = GetRef<Expr>(op);
+ Var var = Downcast<Var>(this->VisitExpr(op->var));
+ Expr value = this->VisitExpr(op->value);
Review comment:
i see. thanks.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]