MCPcopy Index your code
hub / github.com/lutzroeder/netron / deserialize_sym_int

Method deserialize_sym_int

source/python.js:20573–20590  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

20571 return _process_sym_expr(expr, hint);
20572 }
20573 deserialize_sym_int(s) {
20574 const val = s.value;
20575 let hint = null;
20576 if (s.type === 'as_expr') {
20577 if (val.hint === null) {
20578 hint = null;
20579 } else {
20580 // assert val.hint.type == "as_int"
20581 hint = val.hint.value;
20582 }
20583 const sym = this._parse_sym_expr(val.expr_str, hint);
20584 return this.shape_env.create_symintnode(sym, hint);
20585 } else if (s.type === 'as_int') {
20586 // assert type(val) is int
20587 return val;
20588 }
20589 throw new python.Error(`SymInt has invalid field type ${s.type} with value ${s.value}.`);
20590 }
20591 deserialize_sym_bool(s) {
20592 const val = s.value;
20593 let hint = null;

Callers 2

deserialize_graphMethod · 0.80

Calls 2

_parse_sym_exprMethod · 0.80
create_symintnodeMethod · 0.80

Tested by

no test coverage detected