| 120 | } |
| 121 | |
| 122 | static 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 | |
| 136 | static Node* AddRet(Graph* g, Endpoint input, int index) { |
| 137 | DCHECK_LT(0, input.dtype()); |