| 222 | } |
| 223 | |
| 224 | void StopCollectOp(const NodeItem* item, KernelStatsInfo* stat) { |
| 225 | if (!collect_kernel_stats || |
| 226 | collect_stats_done_ || |
| 227 | !collect_op_cost_) { |
| 228 | return; |
| 229 | } |
| 230 | |
| 231 | stat->op_stop_time_ = Env::Default()->NowNanos(); |
| 232 | if (item->node->id() >= nodes_count_) { |
| 233 | LOG(WARNING) << "Item node is exceed nodes_count_, " |
| 234 | << item->node->id() << " VS " << nodes_count_; |
| 235 | } |
| 236 | |
| 237 | immutable_avg_cost_[item->node->id()] += |
| 238 | (stat->op_stop_time_ - stat->op_start_time_); |
| 239 | |
| 240 | node_stats_count_[item->node->id()]++; |
| 241 | // Collect Other info here |
| 242 | |
| 243 | } |
| 244 | |
| 245 | void OpScheduleTask(const NodeItem* item) { |
| 246 | if (!collect_kernel_stats || |
no test coverage detected