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

Function AddArg

tensorflow/core/common_runtime/function.cc:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122static Node* AddArg(Graph* g, DataType dtype, int index) {
123 DCHECK_LT(0, dtype);
124 DCHECK_LT(dtype, DT_FLOAT_REF);
125 NodeDef ndef;
126 ndef.set_name(g->NewName(kNodeLabel));
127 ndef.set_op(kArgOp);
128 AddNodeAttr("T", dtype, &ndef);
129 AddNodeAttr("index", index, &ndef);
130 Status s;
131 Node* ret = g->AddNode(ndef, &s);
132 TF_CHECK_OK(s);
133 return ret;
134}
135
136static Node* AddRet(Graph* g, Endpoint input, int index) {
137 DCHECK_LT(0, input.dtype());

Callers 1

ComputeMethod · 0.85

Calls 5

set_opMethod · 0.80
AddNodeAttrFunction · 0.50
set_nameMethod · 0.45
NewNameMethod · 0.45
AddNodeMethod · 0.45

Tested by

no test coverage detected