| 47 | } // namespace |
| 48 | |
| 49 | TFStats::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 | |
| 75 | TFStats::TFStats(const string& filename, |
| 76 | std::unique_ptr<checkpoint::CheckpointReader> ckpt_reader) |
nothing calls this directly
no test coverage detected