Home
last modified time | relevance | path

Searched refs:op_metrics (Results 1 – 7 of 7) sorted by relevance

/external/tensorflow/tensorflow/core/profiler/utils/
Dop_utils.cc48 OpMetrics* op_metrics = LookupOrInsertNewOpMetrics(/*hlo_module_id=*/0, name); in EnterOp() local
49 if (op_metrics->category().empty()) in EnterOp()
50 op_metrics->set_category(category.data(), category.size()); in EnterOp()
51 op_metrics->set_is_eager(op_metrics->is_eager() || is_eager); in EnterOp()
52 op_metrics->set_occurrences(op_metrics->occurrences() + 1); in EnterOp()
53 op_metrics->set_time_ps(op_metrics->time_ps() + time_ps); in EnterOp()
54 op_metrics->set_self_time_ps(op_metrics->self_time_ps() + self_time_ps); in EnterOp()
75 OpMetrics* op_metrics = LookupOrInsertNewOpMetrics(program_id, name); in EnterOp() local
76 if (op_metrics->category().empty()) in EnterOp()
77 op_metrics->set_category(category == kUnknownOp ? "unknown" in EnterOp()
[all …]
Dop_metrics_db_utils.cc75 OpMetrics*& op_metrics = op_metrics_map_[hlo_module_id][name]; in LookupOrInsertNewOpMetrics() local
76 if (op_metrics == nullptr) { in LookupOrInsertNewOpMetrics()
77 op_metrics = db_->add_metrics_db(); in LookupOrInsertNewOpMetrics()
78 op_metrics->set_hlo_module_id(hlo_module_id); in LookupOrInsertNewOpMetrics()
79 op_metrics->set_name(name.data(), name.size()); in LookupOrInsertNewOpMetrics()
81 return op_metrics; in LookupOrInsertNewOpMetrics()
/external/tensorflow/tensorflow/core/profiler/convert/
Dxplane_to_op_metrics_db_test.cc71 OpMetricsDb op_metrics = ConvertHostThreadsXPlaneToOpMetricsDb(*xplane); in TEST() local
73 EXPECT_EQ(3, op_metrics.metrics_db_size()); in TEST()
76 EXPECT_EQ(total_op_duration, op_metrics.total_op_time_ps()); in TEST()
79 EXPECT_EQ(total_duration, op_metrics.total_time_ps()); in TEST()
82 const OpMetrics& op_1 = op_metrics.metrics_db().at(0); in TEST()
88 const OpMetrics& idle = op_metrics.metrics_db().at(1); in TEST()
93 const OpMetrics& op_2 = op_metrics.metrics_db().at(2); in TEST()
135 OpMetricsDb op_metrics = ConvertDeviceTraceXPlaneToOpMetricsDb(*xplane); in TEST() local
138 EXPECT_EQ(4, op_metrics.metrics_db_size()); in TEST()
141 EXPECT_EQ(total_op_duration, op_metrics.total_op_time_ps()); in TEST()
[all …]
Dop_stats_to_input_pipeline_analysis.cc324 for (const OpMetrics* op_metrics : SortedOpMetricsDb(all_op_metrics)) { in SelectInputOpMetrics() local
325 if (IsInputOp(op_metrics->category())) { in SelectInputOpMetrics()
326 input_op_metrics.input_op_metrics.push_back(op_metrics); in SelectInputOpMetrics()
327 input_op_metrics.input_op_time_ps += op_metrics->self_time_ps(); in SelectInputOpMetrics()
333 InputOpDetails ConvertOpMetricsToInputOpDetails(const OpMetrics& op_metrics, in ConvertOpMetricsToInputOpDetails() argument
337 details.set_op_name(op_metrics.name()); in ConvertOpMetricsToInputOpDetails()
338 details.set_count(op_metrics.occurrences()); in ConvertOpMetricsToInputOpDetails()
339 details.set_time_in_ms(PicosToMillis(op_metrics.time_ps())); in ConvertOpMetricsToInputOpDetails()
340 details.set_self_time_in_ms(PicosToMillis(op_metrics.self_time_ps())); in ConvertOpMetricsToInputOpDetails()
342 100.0 * SafeDivide(op_metrics.time_ps(), input_op_time_ps)); in ConvertOpMetricsToInputOpDetails()
[all …]
/external/tensorflow/tensorflow/core/profiler/protobuf/
DBUILD63 srcs = ["op_metrics.proto"],
Dsteps_db.proto6 import "tensorflow/core/profiler/protobuf/op_metrics.proto";
Dop_stats.proto7 import "tensorflow/core/profiler/protobuf/op_metrics.proto";