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

Function Print

tensorflow/core/framework/function.cc:478–492  ·  view source on GitHub ↗

Various helpers Print(proto) to print relevant protos to ascii.

Source from the content-addressed store, hash-verified

476
477// Various helpers Print(proto) to print relevant protos to ascii.
478string Print(const OpDef::ArgDef& arg) {
479 string out;
480 strings::StrAppend(&out, arg.name(), ":");
481 if (arg.is_ref()) strings::StrAppend(&out, "Ref(");
482 if (!arg.number_attr().empty()) {
483 strings::StrAppend(&out, arg.number_attr(), "*");
484 }
485 if (arg.type() != DT_INVALID) {
486 strings::StrAppend(&out, DataTypeString(arg.type()));
487 } else {
488 strings::StrAppend(&out, arg.type_attr());
489 }
490 if (arg.is_ref()) strings::StrAppend(&out, ")");
491 return out;
492}
493
494// TODO(josh11b): Merge this with SummarizeAttrValue().
495string Print(const AttrValue& attr_value) {

Callers 5

InstantiateFunctionFunction · 0.70
DebugStringFunction · 0.70
DebugStringWholeFunction · 0.70
CanonicalizeFunction · 0.70
TEST_FFunction · 0.50

Calls 15

sortFunction · 0.85
SummarizeAttrValueFunction · 0.85
is_refMethod · 0.80
listMethod · 0.80
attrMethod · 0.80
signatureMethod · 0.80
DataTypeStringFunction · 0.70
nameMethod · 0.65
typeMethod · 0.65
StrAppendFunction · 0.50
StrCatFunction · 0.50
ConsumePrefixFunction · 0.50

Tested by 1

TEST_FFunction · 0.40