Unverified Commit 0247b971 by Tianqi Chen Committed by GitHub

[RUNTIME] Fix debug runtime i386 build (#1818)

parent d713d63d
...@@ -22,6 +22,7 @@ class GraphRuntimeDebug : public GraphRuntime { ...@@ -22,6 +22,7 @@ class GraphRuntimeDebug : public GraphRuntime {
/*! /*!
* \brief Run each operation and get the output. * \brief Run each operation and get the output.
* \param index The index of op which needs to be run. * \param index The index of op which needs to be run.
* \return the elapsed time.
*/ */
double DebugRun(size_t index) { double DebugRun(size_t index) {
CHECK(index < op_execs().size()); CHECK(index < op_execs().size());
...@@ -104,7 +105,7 @@ PackedFunc GraphRuntimeDebug::GetFunction( ...@@ -104,7 +105,7 @@ PackedFunc GraphRuntimeDebug::GetFunction(
// return member functions during query. // return member functions during query.
if (name == "debug_run") { if (name == "debug_run") {
return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) {
*rv = this->DebugRun(args[0]); *rv = this->DebugRun(static_cast<size_t>(args[0].operator int64_t()));
}); });
} else if (name == "get_output_by_layer") { } else if (name == "get_output_by_layer") {
return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) {
...@@ -129,7 +130,7 @@ PackedFunc GraphRuntimeDebug::GetFunction( ...@@ -129,7 +130,7 @@ PackedFunc GraphRuntimeDebug::GetFunction(
* \param m Compiled module which will be loaded. * \param m Compiled module which will be loaded.
* \param ctxs All devices contexts. * \param ctxs All devices contexts.
*/ */
Module GraphRuntimeDebugCreate(const std::string& sym_json, Module GraphRuntimeDebugCreate(const std::string& sym_json,
const tvm::runtime::Module& m, const tvm::runtime::Module& m,
const std::vector<TVMContext>& ctxs) { const std::vector<TVMContext>& ctxs) {
std::shared_ptr<GraphRuntimeDebug> exec = std::make_shared<GraphRuntimeDebug>(); std::shared_ptr<GraphRuntimeDebug> exec = std::make_shared<GraphRuntimeDebug>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment