(sym, hint, source)
| 8666 | constrain_symbol_range(/* s, compiler_min, compiler_max */) { |
| 8667 | } |
| 8668 | create_symintnode(sym, hint, source) { |
| 8669 | let out = null; |
| 8670 | let fx_node = null; |
| 8671 | if (this._translation_validation_enabled && source !== null) { |
| 8672 | throw new python.Error('Not implemented.'); |
| 8673 | } else { |
| 8674 | fx_node = null; |
| 8675 | } |
| 8676 | if (builtins.isinstance(sym, sympy.core.numbers.Integer)) { |
| 8677 | out = builtins.int(sym); |
| 8678 | if (hint !== null && out !== hint) { |
| 8679 | throw new python.Error(`Symbolic integer has value '${out}' but expected '${hint}'.`); |
| 8680 | } |
| 8681 | } else { |
| 8682 | // if free_unbacked_symbols(sym): |
| 8683 | // hint = None |
| 8684 | out = new torch.SymInt(new torch.fx.experimental.sym_node.SymNode(sym, this, builtins.int, hint, null, fx_node)); |
| 8685 | } |
| 8686 | return out; |
| 8687 | } |
| 8688 | create_symboolnode(sym) { |
| 8689 | return new torch.SymBool(new torch.fx.experimental.sym_node.SymNode(sym, this, builtins.bool, null)); |
| 8690 | } |
no test coverage detected