tkonolige commented on a change in pull request #9277: URL: https://github.com/apache/tvm/pull/9277#discussion_r728492109
########## File path: python/tvm/contrib/graph_executor.py ########## @@ -98,17 +98,17 @@ def get_device(libmod, device): device_type_id = [] for cur_dev in device: device_type = cur_dev.device_type Review comment: Delete this line? ########## File path: python/tvm/relay/backend/executor_factory.py ########## @@ -137,7 +137,7 @@ def __init__( self.ir_mod = ir_mod self.target = target - self.module = fcreate(graph_json_str, libmod, libmod_name, *args) + self.module = fcreate(graph_json_str, libmod, libmod_name, str(target), *args) Review comment: I assume you are passing the target by string because this will be called over rpc? Can you add a comment to that effect? ########## File path: src/runtime/graph_executor/graph_executor_factory.cc ########## @@ -196,13 +204,13 @@ TVM_REGISTER_GLOBAL("tvm.graph_executor_factory.create") << args.num_args; // The argument order is graph_json, module, module_name, param0_name, param0_tensor, Review comment: Can you update this comment? and the check above? ########## File path: src/runtime/graph_executor/graph_executor_factory.cc ########## @@ -37,16 +37,18 @@ namespace runtime { GraphExecutorFactory::GraphExecutorFactory( const std::string& graph_json, const std::unordered_map<std::string, tvm::runtime::NDArray>& params, - const std::string& module_name) { + const std::string& target_str, const std::string& module_name) { Review comment: I think it would be better to have this be a `Target`, and the packed function handles the conversion from string to `Target`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org