MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / StopCollectOp

Method StopCollectOp

tensorflow/core/common_runtime/kernel_stat.h:224–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 ||

Callers 2

ProcessSyncMethod · 0.80
ProcessAsyncMethod · 0.80

Calls 3

DefaultFunction · 0.85
NowNanosMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected