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

Method ReInit

tensorflow/core/profiler/internal/tfprof_node_show.cc:28–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void ShowNode::ReInit(int64 step) {
29 mutable_proto()->set_name(name());
30 mutable_proto()->clear_devices();
31 if (!node->canonical_device().empty()) {
32 mutable_proto()->add_devices(node->canonical_device());
33 }
34 mutable_proto()->set_run_count(node->run_count(step));
35 mutable_proto()->set_exec_micros(node->exec_micros(step));
36 mutable_proto()->set_accelerator_exec_micros(
37 node->accelerator_exec_micros(step));
38 mutable_proto()->set_cpu_exec_micros(node->cpu_exec_micros(step));
39
40 mutable_proto()->set_requested_bytes(node->requested_bytes(step));
41 mutable_proto()->set_peak_bytes(node->peak_bytes(step));
42 mutable_proto()->set_residual_bytes(node->residual_bytes(step));
43 mutable_proto()->set_output_bytes(node->output_bytes(step));
44
45 mutable_proto()->set_float_ops(node->float_ops(step));
46
47 mutable_proto()->clear_input_shapes();
48 for (const auto& inp : node->input_shapes()) {
49 (*mutable_proto()->mutable_input_shapes())[inp.first].MergeFrom(
50 VecToShapeProto(inp.second));
51 }
52 proto_.set_parameters(node->parameters());
53}
54
55GraphNodeProto* ShowNode::mutable_proto() { return &proto_; }
56

Callers 2

ReAccountMethod · 0.45
ReAccountMethod · 0.45

Calls 15

nameFunction · 0.85
VecToShapeProtoFunction · 0.85
canonical_deviceMethod · 0.80
input_shapesMethod · 0.80
SnapshotNodesMethod · 0.80
AddSelfToTotalStatsMethod · 0.80
protoMethod · 0.80
set_nameMethod · 0.45
emptyMethod · 0.45
run_countMethod · 0.45
exec_microsMethod · 0.45

Tested by

no test coverage detected