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

Method AddOpLogProto

tensorflow/core/profiler/internal/tfprof_stats.cc:239–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239void TFStats::AddOpLogProto(std::unique_ptr<OpLogProto> op_log) {
240 if (!op_log) {
241 return;
242 }
243 for (const auto& entry : op_log->id_to_string()) {
244 if (id_to_string_.find(entry.first) == id_to_string_.end()) {
245 id_to_string_[entry.first] = entry.second;
246 }
247 }
248 for (const OpLogEntry& entry : op_log->log_entries()) {
249 auto node = nodes_map_.find(entry.name());
250 if (node == nodes_map_.end()) continue;
251 for (const string& type : entry.types()) {
252 node->second->AddOpType(type);
253 }
254 if (entry.float_ops()) {
255 node->second->AddFloatOps(entry.float_ops());
256 }
257 if (entry.has_code_def()) {
258 has_code_traces_ = true;
259 node->second->AddCode(entry.code_def(), &id_to_string_);
260 }
261 }
262}
263
264void TFStats::AddRunMeta(int64 step, std::unique_ptr<RunMetadata> run_meta) {
265 if (!run_meta || !run_meta->has_step_stats()) {

Callers 1

AddStepFunction · 0.80

Calls 8

typesMethod · 0.80
AddOpTypeMethod · 0.80
AddFloatOpsMethod · 0.80
AddCodeMethod · 0.80
nameMethod · 0.65
findMethod · 0.45
endMethod · 0.45
float_opsMethod · 0.45

Tested by

no test coverage detected