| 20 | } |
| 21 | |
| 22 | DeviceQueue::~DeviceQueue() |
| 23 | { |
| 24 | if (LOG_IS_ON(LOG_LEVEL_TRACE)) { |
| 25 | /* Print kernel execution times sorted by time. */ |
| 26 | vector<pair<DeviceKernelMask, double>> stats_sorted; |
| 27 | for (const auto &stat : stats_kernel_time_) { |
| 28 | stats_sorted.push_back(stat); |
| 29 | } |
| 30 | |
| 31 | sort(stats_sorted.begin(), |
| 32 | stats_sorted.end(), |
| 33 | [](const pair<DeviceKernelMask, double> &a, const pair<DeviceKernelMask, double> &b) { |
| 34 | return a.second > b.second; |
| 35 | }); |
| 36 | |
| 37 | LOG_TRACE << "GPU queue stats:"; |
| 38 | double total_time = 0.0; |
| 39 | for (const auto &[mask, time] : stats_sorted) { |
| 40 | total_time += time; |
| 41 | LOG_TRACE << " " << std::setfill(' ') << std::setw(10) << std::fixed << std::setprecision(5) |
| 42 | << std::right << time << "s: " << device_kernel_mask_as_string(mask); |
| 43 | } |
| 44 | |
| 45 | if (is_per_kernel_performance_) { |
| 46 | LOG_TRACE << "GPU queue total time: " << std::fixed << std::setprecision(5) << total_time; |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | void DeviceQueue::debug_init_execution() |
| 52 | { |
nothing calls this directly
no test coverage detected