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

Method TFStats

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

Source from the content-addressed store, hash-verified

47} // namespace
48
49TFStats::TFStats(std::unique_ptr<GraphDef> graph,
50 std::unique_ptr<RunMetadata> run_meta,
51 std::unique_ptr<OpLogProto> op_log,
52 std::unique_ptr<checkpoint::CheckpointReader> ckpt_reader)
53 : has_code_traces_(false),
54 miss_accelerator_stream_(false),
55 ckpt_reader_(std::move(ckpt_reader)) {
56 CHECK(graph) << "Must at least have GraphDef";
57
58 printf("Parsing Inputs...\n");
59 AddGraph(std::move(graph));
60 if (run_meta && run_meta->has_step_stats()) {
61 AddRunMeta(0, std::move(run_meta));
62 }
63 AddOpLogProto(std::move(op_log));
64
65 if (ckpt_reader_) {
66 for (const auto& v : ckpt_reader_->GetVariableToShapeMap()) {
67 auto node = nodes_map_.find(v.first);
68 if (node != nodes_map_.end()) {
69 node->second->AddOpType("_checkpoint_variables");
70 }
71 }
72 }
73}
74
75TFStats::TFStats(const string& filename,
76 std::unique_ptr<checkpoint::CheckpointReader> ckpt_reader)

Callers

nothing calls this directly

Calls 15

ReadFileToStringFunction · 0.85
DefaultFunction · 0.85
GetVariableToShapeMapMethod · 0.80
AddOpTypeMethod · 0.80
c_strMethod · 0.80
has_traceMethod · 0.80
stepsMethod · 0.80
nameMethod · 0.65
findMethod · 0.45
endMethod · 0.45
okMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected