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



##########
File path: src/relay/transforms/annotate_target.cc
##########
@@ -161,8 +200,9 @@ class AnnotateTargetRewriter : public ExprRewriter {
       const CallNode* first_arg_call = pre->args[0].as<CallNode>();
       if (first_arg_call && first_arg_call->op == CompilerBeginOp()) {
         std::string arg_target = 
first_arg_call->attrs.as<CompilerAttrs>()->compiler;
-        if (arg_target != "default") {
-          supported_targets.push_back(arg_target);
+        if (arg_target != default_target) {
+          // annotated already
+          return post;

Review comment:
       Here it is peeking first arg and if it is already annotated with 
non-default target it returns the node untouched, preserving the target.




----------------------------------------------------------------
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]


Reply via email to