(idx_val, loc)
| 17879 | return this.graph.insertNode(this.graph.createTupleIndex(tuple_val, idx_val, output_type)).output(); |
| 17880 | } |
| 17881 | getSliceInd(idx_val, loc) { |
| 17882 | const ivalue = torch._C.toIValue(idx_val); |
| 17883 | if (ivalue && ivalue.isInt()) { |
| 17884 | return ivalue.toInt(); |
| 17885 | } |
| 17886 | throw new python.Error(`Tuple slice indices must be integer constants at '${loc}'.`); |
| 17887 | } |
| 17888 | emitTupleSlice(loc, tuple_val, tuple_args) { |
| 17889 | const tuple_type = tuple_val.value(this.graph).type().expect(torch.TupleType); |
| 17890 | const tuple_len = tuple_type.elements().length; |
no test coverage detected