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

Function ProtobufEquals

tensorflow/compiler/xla/protobuf_util.cc:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace protobuf_util {
28
29bool ProtobufEquals(const tensorflow::protobuf::Message& m1,
30 const tensorflow::protobuf::Message& m2) {
31 // This is a bit fast and loose, but avoids introducing a dependency on
32 // the much more complex protobuf::util::MessageDifferencer class. For
33 // our purposes we just say that two protobufs are equal if their serialized
34 // representations are equal.
35 string serialized1, serialized2;
36 m1.AppendToString(&serialized1);
37 m2.AppendToString(&serialized2);
38 return (serialized1 == serialized2);
39}
40
41Status DumpProtoToDirectory(const tensorflow::protobuf::Message& message,
42 const string& directory, const string& file_name,

Callers 6

DotIsDefaultFunction · 0.85
IdenticalSlowPathMethod · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
XLA_TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 4

TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
XLA_TEST_FFunction · 0.68