tkonolige commented on code in PR #11465:
URL: https://github.com/apache/tvm/pull/11465#discussion_r907895702
##########
src/runtime/graph_executor/debug/graph_executor_debug.cc:
##########
@@ -176,10 +189,18 @@ class GraphExecutorDebug : public GraphExecutor {
}
TVMRetValue rv;
time_eval.CallPacked(TVMArgs(values.get(), type_codes.get(),
num_flat_args), &rv);
- std::string results = rv.operator std::string();
- const double* results_arr = reinterpret_cast<const
double*>(results.data());
- LOG(INFO) << "Got op timing: " << results_arr[0];
- return results_arr[0];
+ std::string results_str = rv.operator std::string();
+ const double* blob_ptr = reinterpret_cast<const
double*>(results_str.data());
+ for (int i = 0; i < repeat; ++i, ++blob_ptr) {
+ results[i] = *blob_ptr;
+ }
+
+ std::ostringstream os;
+ for (auto& repeat_data : results) {
+ os << std::to_string(repeat_data) << ", ";
+ }
+ LOG(WARNING) << "Got op timing: " << os.str();
Review Comment:
```suggestion
LOG(INFO) << "Got op timing: " << os.str();
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]