tvm_tirx.script.ir_builder.parser_protocol.break_

Contents

tvm_tirx.script.ir_builder.parser_protocol.break_#

tvm_tirx.script.ir_builder.parser_protocol.break_(*, loc=None)#

Emit break for the enclosing language variant loop.

Parameters:

loc (LocationEntry, Location or None, optional) – Location for the constructed result. None (the default) leaves explicit location unspecified; active source-call provenance is composed by the builder. Frames retain their location until finalization.

Returns:

AlreadyEmitted[Any] – Receipt retaining the exact emitted statement; consuming it emits nothing again.

Return type:

AlreadyEmitted[Any]

Notes

TIRx requires an enclosing native ForFrame or WhileFrame inside the current primitive function, emits break for that loop and raises ValueError otherwise. Relax raises TypeError. Explicit constexpr loops retain ordinary Python control flow.

# Source
break
# Generated builder
X.break_()