| 33 | } |
| 34 | |
| 35 | void TensorRTProfiler::print_layer_times() { |
| 36 | float total_time = 0; |
| 37 | for (size_t i = 0; i < profile.size(); ++i) { |
| 38 | printf("%s %4.3fms\n", profile[i].first.c_str(), profile[i].second); |
| 39 | total_time += profile[i].second; |
| 40 | } |
| 41 | printf("Total time: %4.3fms\n", total_time); |
| 42 | } |
| 43 | |
| 44 | #endif // MGB_ENABLE_JSON |
| 45 |