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

Function OpDefHash

tensorflow/core/framework/op_def_util.cc:858–870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

856}
857
858uint64 OpDefHash(const OpDef& o) {
859 uint64 h = RepeatedAttrDefHash(o.attr());
860
861 // Compute deterministic order-independent control outputs hash.
862 std::set<string> control_output(o.control_output().begin(),
863 o.control_output().end());
864 for (const auto& co : control_output) h = Hash64Combine(h, Hash64(co));
865
866 OpDef o_copy = o;
867 o_copy.clear_attr();
868 o_copy.clear_control_output();
869 return DeterministicProtoHash64(o_copy, h);
870}
871
872} // namespace tensorflow

Callers 4

FunctionDefHashFunction · 0.85
ExpectEqualFunction · 0.85
ExpectDifferentFunction · 0.85
HashSubgraphFunctionImplFunction · 0.85

Calls 7

RepeatedAttrDefHashFunction · 0.85
Hash64CombineFunction · 0.85
DeterministicProtoHash64Function · 0.85
attrMethod · 0.80
Hash64Function · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by 2

ExpectEqualFunction · 0.68
ExpectDifferentFunction · 0.68