comaniac commented on a change in pull request #6655:
URL: https://github.com/apache/incubator-tvm/pull/6655#discussion_r528879637
##########
File path: src/relay/transforms/annotate_target.cc
##########
@@ -93,18 +106,20 @@ class AnnotateTargetRewriter : public ExprRewriter {
if (ref_target == "") {
ref_target = arg_target;
} else if (ref_target != arg_target) {
- ref_target = "default";
+ ref_target = default_target;
}
}
// Determine compiler begin target.
std::string op_target = (target == "") ? ref_target : target;
- Array<Expr> compiler_begins;
- for (const auto& end : compiler_ends) {
- compiler_begins.push_back(InsertAnnotation(end, op_target,
make_begin_op));
+ if (ref_target != "") {
+ for (const auto& end : compiler_ends) {
+ compiler_begins.push_back(InsertAnnotation(end, op_target,
make_begin_op));
+ }
+ } else {
+ return {op_target, args};
Review comment:
nvm. I figured it out.
----------------------------------------------------------------
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]