d-smirnov commented on a change in pull request #6655:
URL: https://github.com/apache/incubator-tvm/pull/6655#discussion_r528781372
##########
File path: src/relay/transforms/annotate_target.cc
##########
@@ -203,16 +242,18 @@ class AnnotateTargetRewriter : public ExprRewriter {
}
}
}
- supported_targets.push_back("default"); // Make default as the last
option.
-
+ supported_targets.push_back(default_target); // Make default as the last
option.
+ // Visit and mutate arguments after the target of this op has been
determined.
+ Call post_call = Downcast<Call>(post);
+ if (pre->op->IsInstance<VarNode>()) {
Review comment:
The test case is
tests/python/relay/test_pass_annotate_target.py::test_while_let
##########
File path: src/relay/transforms/annotate_target.cc
##########
@@ -203,16 +242,18 @@ class AnnotateTargetRewriter : public ExprRewriter {
}
}
}
- supported_targets.push_back("default"); // Make default as the last
option.
-
+ supported_targets.push_back(default_target); // Make default as the last
option.
+ // Visit and mutate arguments after the target of this op has been
determined.
+ Call post_call = Downcast<Call>(post);
+ if (pre->op->IsInstance<VarNode>()) {
Review comment:
The test case is
`tests/python/relay/test_pass_annotate_target.py::test_while_let`
----------------------------------------------------------------
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]