Skip to content

Commit

Permalink
[Hexagon] Fix compilation errors in Hexagon launcher (apache#9189)
Browse files Browse the repository at this point in the history
A few instances of `runtime::Device` were missed when `Device` was moved
from `tvm::runtime` to `tvm`.

Co-authored-by: Abhikrant Sharma <quic_abhikran@quicinc.com>
  • Loading branch information
2 people authored and ylc committed Jan 7, 2022
1 parent 99fdd3d commit 3917bef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/runtime/hexagon/launcher/launcher_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ tvm::runtime::Module load_module(const std::string& file_name) {
}

tvm::runtime::Module create_graph_executor(const std::string& graph_json,
tvm::runtime::Module graph_module,
tvm::runtime::Device device) {
tvm::runtime::Module graph_module, tvm::Device device) {
std::string launcher_name = "tvm.graph_executor.create";

const tvm::runtime::PackedFunc create_executor = get_runtime_func(launcher_name);
Expand Down
7 changes: 2 additions & 5 deletions src/runtime/hexagon/launcher/launcher_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ struct Model {
tvm::runtime::Module graph_module;
std::string graph_json;

static tvm::runtime::Device device() {
return tvm::runtime::Device{static_cast<DLDeviceType>(kDLHexagon), 0};
}
static tvm::Device device() { return tvm::Device{static_cast<DLDeviceType>(kDLHexagon), 0}; }

tvm::runtime::PackedFunc run;
};
Expand Down Expand Up @@ -126,7 +124,6 @@ const tvm::runtime::PackedFunc get_module_func(tvm::runtime::Module module,
const std::string& name);

tvm::runtime::Module create_graph_executor(const std::string& graph_json,
tvm::runtime::Module graph_module,
tvm::runtime::Device device);
tvm::runtime::Module graph_module, tvm::Device device);

#endif // TVM_RUNTIME_HEXAGON_LAUNCHER_LAUNCHER_CORE_H_

0 comments on commit 3917bef

Please sign in to comment.