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

Function RepeatedNodeDefHash

tensorflow/core/util/equal_graph_def.cc:80–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80uint64 RepeatedNodeDefHash(const protobuf::RepeatedPtrField<NodeDef>& ndefs,
81 const EqualGraphDefOptions& options) {
82 uint64 h = 0xDECAFCAFFE;
83 // Insert NodeDefs into map to deterministically sort by name
84 std::map<string, const NodeDef*> nodes;
85 for (const NodeDef& node : ndefs) {
86 nodes[node.name()] = &node;
87 }
88 for (const auto& pair : nodes) {
89 h = Hash64(pair.first.data(), pair.first.size(), h);
90 h = Hash64Combine(NodeDefHash(*pair.second, options), h);
91 }
92 return h;
93}
94
95namespace {
96

Callers 2

FunctionDefHashFunction · 0.85
GraphDefHashFunction · 0.85

Calls 6

Hash64CombineFunction · 0.85
NodeDefHashFunction · 0.85
nameMethod · 0.65
Hash64Function · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected