You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by zh...@apache.org on 2020/03/27 16:19:09 UTC

[incubator-tvm] branch master updated: [External Codegen] Fix annotate pass static variable (#5023)

This is an automated email from the ASF dual-hosted git repository.

zhic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
     new 949dca4  [External Codegen] Fix annotate pass static variable (#5023)
949dca4 is described below

commit 949dca4d078dbeb7990294b1f7a83de5b6ed4a25
Author: mbaret <55...@users.noreply.github.com>
AuthorDate: Fri Mar 27 16:19:01 2020 +0000

    [External Codegen] Fix annotate pass static variable (#5023)
    
    'fannotate' in the annotate_target pass was designated as
    static. This meant that if you use the pass to annotate
    more than one codegen, its value is not updated when the
    target changes resulting in incorrect annotation.
    
    Change-Id: Ib4f3af5cfbef44f29771818219755198ac313a0e
---
 src/relay/transforms/annotate_target.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/relay/transforms/annotate_target.cc b/src/relay/transforms/annotate_target.cc
index 162cc19..e6f4a18 100644
--- a/src/relay/transforms/annotate_target.cc
+++ b/src/relay/transforms/annotate_target.cc
@@ -43,7 +43,7 @@ class AnnotateTargetWrapper : public ExprMutator {
     auto new_e = ExprMutator::VisitExpr_(cn);
 
     Call call = Downcast<Call>(new_e);
-    static auto fannotate = Op::GetAttr<FTVMAnnotateTarget>("target." + target_);
+    auto fannotate = Op::GetAttr<FTVMAnnotateTarget>("target." + target_);
     Op op = Downcast<Op>(call->op);
     CHECK(op.defined());