Unverified Commit 949dca4d by mbaret Committed by GitHub

[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
parent 68046ba3
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment