Skip to content

Commit

Permalink
Don't run non-tvm_op GraphRuntime nodes in Debug Runtime over RPC. (a…
Browse files Browse the repository at this point in the history
…pache#7512)

* Don't run non-tvm_op GraphRuntime nodes in Debug Runtime over RPC.

 * These are filtered out in SetupOpExecs for normal debug runtime
 operation.

* retrigger CI

* retrigger CI

* address tkonolige comment
  • Loading branch information
areusch authored and trevor-m committed Mar 2, 2021
1 parent 7795944 commit 609c62d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/runtime/graph/debug/graph_runtime_debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ class GraphRuntimeDebug : public GraphRuntime {
}

double RunOpRPC(int index, int number, int repeat, int min_repeat_ms) {
// Right now we expect either "tvm_op" for nodes which run PackedFunc or "null" for nodes which
// represent inputs/parameters to the graph. Other types may be supported in the future, but
// consideration would be needed as to how to do that over RPC before we support it here.
if (nodes_[index].op_type != "tvm_op") {
CHECK_EQ(nodes_[index].op_type, "null")
<< "Don't know how to run op type " << nodes_[index].op_type
<< " remotely over RPC right now";

// NOTE: GraphRuntimeDebug expects graph nodes to have an "op" attribute of "tvm_op" or "null"
// and "null" is a placeholder node for a parameter or input.
return 0;
}

const TVMContext& ctx = data_entry_[entry_id(index, 0)]->ctx;
TVMOpParam param = nodes_[index].param;
std::string name = param.func_name;
Expand Down

0 comments on commit 609c62d

Please sign in to comment.