This bug was introduced in #6964 .
Currently, use graph debug runtime will get wrong time result.
Cause:
|
double RunOpHost(int index) { |
|
auto op_tbegin = std::chrono::high_resolution_clock::now(); |
|
op_execs_[index](); |
|
const TVMContext& ctx = data_entry_[entry_id(index, 0)]->ctx; |
|
TVMSynchronize(ctx.device_type, ctx.device_id, nullptr); |
|
auto op_tend = std::chrono::high_resolution_clock::now(); |
|
double op_duration = |
|
std::chrono::duration_cast<std::chrono::duration<double> >(op_tend - op_tbegin).count(); |
|
return op_duration; |
|
} |
This function returns a time with second, but is expected to return microsecond.
cc @areusch
This bug was introduced in #6964 .
Currently, use graph debug runtime will get wrong time result.
Cause:
tvm/src/runtime/graph/debug/graph_runtime_debug.cc
Lines 150 to 159 in d052752
This function returns a time with second, but is expected to return microsecond.
cc @areusch