Skip to content

Commit

Permalink
Template ambiguity resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
ANSHUMAN TRIPATHY authored and ANSHUMAN TRIPATHY committed Jun 3, 2020
1 parent 2891365 commit 6b3dd52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/relay/backend/compile_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ class CompileEngineImpl : public CompileEngineNode {
cache_node->funcs = (*f)(cfunc->schedule, all_args, cache_node->func_name, key->source_func);
} else {
using tvm::transform::PassContext;
With<PassContext> fresh_pass_ctx_scope(PassContext());
With<PassContext> fresh_pass_ctx_scope(static_cast<PassContext>(PassContext()));

std::unordered_map<te::Tensor, tir::Buffer> binds;
cache_node->funcs = tvm::lower(cfunc->schedule, all_args, cache_node->func_name, binds);
Expand Down Expand Up @@ -726,7 +726,7 @@ class CompileEngineImpl : public CompileEngineNode {
}

using tvm::transform::PassContext;
With<PassContext> fresh_pass_ctx_scope(PassContext());
With<PassContext> fresh_pass_ctx_scope(static_cast<PassContext>(PassContext()));

std::unordered_map<te::Tensor, tir::Buffer> binds;
cache_node->funcs = tvm::lower(spair.first, all_args, cache_node->func_name, binds);
Expand Down
2 changes: 1 addition & 1 deletion src/relay/transforms/fold_constant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Expr FoldConstant(const Expr& expr, const IRModule& mod) {
Target target = Target::Create("llvm");
// use a fresh build context
// in case we are already in a build context.
With<PassContext> fresh_build_ctx(PassContext());
With<PassContext> fresh_build_ctx(static_cast<PassContext>(PassContext()));

return ConstantFolder(CreateInterpreter(mod, ctx, target), mod).Mutate(expr);
}
Expand Down
2 changes: 1 addition & 1 deletion src/relay/transforms/partial_eval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ FInterpreter CPUInterpreter() {
Target target = Target::Create("llvm");
// use a fresh build context
// in case we are already in a build context.
With<PassContext> fresh_build_ctx(PassContext());
With<PassContext> fresh_build_ctx(static_cast<PassContext>(PassContext()));

return CreateInterpreter(IRModule(nullptr), CPUContext(), target);
}
Expand Down

0 comments on commit 6b3dd52

Please sign in to comment.