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

Method AddIdentityNode

tensorflow/compiler/tf2xla/functionalize_cond.cc:927–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

925}
926
927Status FunctionalizeCond::AddIdentityNode(const Node* replacee, Node* if_node,
928 int port) {
929 NodeBuilder id_builder(replacee->name(), "Identity");
930 id_builder.Input(if_node, port);
931 string outside_compilation;
932 if (GetNodeAttr(if_node->def(), kXlaOutsideCompilationAttrName,
933 &outside_compilation)
934 .ok()) {
935 id_builder.Attr(kXlaOutsideCompilationAttrName, outside_compilation);
936 }
937 Node* id;
938 TF_RETURN_IF_ERROR(id_builder.Finalize(graph_, &id));
939 state_map_.ResetCondId(id, state_map_.LookupCondId(if_node));
940 state_map_.ResetAncestorId(id, state_map_.LookupAncestorId(if_node));
941 return Status::OK();
942}
943
944StatusOr<Node*> FunctionalizeCond::AddIfNode(const NodeDef& def,
945 const Node* replacee,

Callers 1

AddOutputEdgesMethod · 0.80

Calls 10

ResetCondIdMethod · 0.80
LookupCondIdMethod · 0.80
ResetAncestorIdMethod · 0.80
LookupAncestorIdMethod · 0.80
nameMethod · 0.65
GetNodeAttrFunction · 0.50
InputMethod · 0.45
okMethod · 0.45
AttrMethod · 0.45
FinalizeMethod · 0.45

Tested by

no test coverage detected