Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few bugs in remove-compile-engine #13

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion python/tvm/relay/backend/_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def build(mod, target, target_host=None):
"""
if target_host == "":
target_host = None
import pdb; pdb.set_trace()
return tvm.driver.build(mod, target=target, target_host=target_host)


Expand Down
3 changes: 0 additions & 3 deletions src/relay/backend/graph_runtime_codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ class GraphRuntimeCodegen : public backend::MemoizedExprTranslator<std::vector<G

ret.lowered_funcs = lowered_module.per_target_module;
std::cout << "Modules: " << ret.lowered_funcs << std::endl;
zhiics marked this conversation as resolved.
Show resolved Hide resolved
auto it = ret.lowered_funcs.begin();
(*it).second->Update(main_module);
ret.external_mods = lowered_module.external_mods;
return ret;
}
Expand Down Expand Up @@ -410,7 +408,6 @@ class GraphRuntimeCodegen : public backend::MemoizedExprTranslator<std::vector<G
// LOG(FATAL) << "TVM only support calls to primitive functions "
// << "(i.e functions composed of fusable operator invocations)";
// }
std::cout << PrettyPrint(call) << std::endl;

if (auto op_node = call->op.as<OpNode>()) {
if (op_node->name != "prim_fn_call") {
Expand Down
12 changes: 2 additions & 10 deletions src/relay/backend/tir_compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -887,17 +887,9 @@ class LowerTensorExpr : public ExprMutator {
}

// Process inputs.
bool skip_first;
Array<Expr> args;
for (auto arg : expr->args) {
// The first input is a function, not a tensor.
if (skip_first) {
skip_first = false;
args.push_back(arg);
continue;
}

args.push_back(VisitExpr(arg));
for (size_t i = 0; i < expr->args.size(); i++) {
args.push_back(VisitExpr(expr->args[i]));
}

Target target;
Expand Down