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

Function AddRet

tensorflow/core/common_runtime/function.cc:136–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static Node* AddRet(Graph* g, Endpoint input, int index) {
137 DCHECK_LT(0, input.dtype());
138 DCHECK_LT(input.dtype(), DT_FLOAT_REF);
139 NodeDef ndef;
140 ndef.set_name(g->NewName(kNodeLabel));
141 ndef.set_op(kRetOp);
142 ndef.add_input(input.name());
143 AddNodeAttr("T", input.dtype(), &ndef);
144 AddNodeAttr("index", index, &ndef);
145 Status s;
146 Node* ret = g->AddNode(ndef, &s);
147 TF_CHECK_OK(s);
148 g->AddEdge(input.node, input.index, ret, 0);
149 return ret;
150}
151
152// FunctionLibraryRuntime implementation that forwards all the function calls to
153// the base runtime implementation, and only overrides FunctionLibraryDefinition

Callers 1

ComputeMethod · 0.85

Calls 9

set_opMethod · 0.80
nameMethod · 0.65
AddNodeAttrFunction · 0.50
dtypeMethod · 0.45
set_nameMethod · 0.45
NewNameMethod · 0.45
add_inputMethod · 0.45
AddNodeMethod · 0.45
AddEdgeMethod · 0.45

Tested by

no test coverage detected