tvm_tirx.script.ir_builder.parser_protocol.unpack_#
- tvm_tirx.script.ir_builder.parser_protocol.unpack_(value)#
Expose elements for ordinary Python target unpacking.
- Parameters:
value (Any) – Concrete IR tuple, typed tuple expression, or ordinary host iterable.
- Returns:
Any – A Python tuple of IR fields/projections for an IR tuple; otherwise the original value.
- Return type:
Any
Notes
No statement is emitted and no builder frame is entered. Known IR tuple types supply arity; ordinary Python performs target-count/starred-unpacking checks. Field identities are retained for concrete tuples. Direct-call results keep ordinary Python unpacking without this hook.
# Source a, b = value # Generated builder left, right = X.unpack_(value) a = X.bind_(left, name="a") b = X.bind_(right, name="b")