d-smirnov commented on a change in pull request #6655:
URL: https://github.com/apache/incubator-tvm/pull/6655#discussion_r528595071



##########
File path: src/relay/transforms/annotate_target.cc
##########
@@ -113,18 +118,26 @@ class AnnotateTargetRewriter : public ExprRewriter {
     std::vector<std::string> supported_targets;
 
     auto op_node = pre->op.as<OpNode>();
-
     // This graph has annotations, meaning that this is not the first time 
running this pass.
     if (op_node && pre->op == CompilerBeginOp()) {
       // Bypass compiler begin due to lack of target information. It will be 
processed
       // when the following op handling arguments.
       CHECK_EQ(pre->args.size(), 1U);
-      return post.as<CallNode>()->args[0];
+
+      std::string begin_target = pre->attrs.as<CompilerAttrs>()->compiler;
+      if ("" == begin_target || begin_target == DEFAULT_TARGET_NAME)

Review comment:
       refactored




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to