| 17721 | return torch._C.insertConstant(this.graph, c.value, c.range()); |
| 17722 | } |
| 17723 | emitConst(c) { |
| 17724 | if (c.type === 'int') { |
| 17725 | return torch._C.materializeConstant(new torch._C.IValue(c.value, 'Int'), this.graph, c.range(), this.integral_constants); |
| 17726 | } else if (c.type === 'complex') { |
| 17727 | return torch._C.materializeConstant(new torch._C.IValue(c.value, 'Complex'), this.graph, c.range(), this.complex_constants); |
| 17728 | } else if (c.type === 'float') { |
| 17729 | return torch._C.materializeConstant(new torch._C.IValue(c.value, 'Double'), this.graph, c.range(), this.fp_constants); |
| 17730 | } |
| 17731 | throw new python.Error(`Unsupported constant type.`); |
| 17732 | } |
| 17733 | emitListLiteral(ll, type_hint) { |
| 17734 | type_hint = type_hint || null; |
| 17735 | const values = this.getValues(ll.elts, true); |