tvm_tirx.script.ir_builder.parser_protocol.and_

Contents

tvm_tirx.script.ir_builder.parser_protocol.and_#

tvm_tirx.script.ir_builder.parser_protocol.and_(*values)#

Construct a conjunction from ordinary boolean or comparison operands.

Parameters:

*values (Any) – Eagerly constructed host or IR operands in source order. TIRx constructs primitive conjunctions; Relax selects primitive or tensor operations.

Returns:

Any – The host boolean or native conjunction expression.

Return type:

Any

Notes

Empty operands raise TypeError. Simple comparison chains accept only names and numeric literals, including signed literals. They lower directly to adjacent comparisons with this conjunction; complex chain operands are a source error before evaluation. There are no temporary operand bindings or substitution. Explicit constexpr code retains Python short-circuit behavior.

# Source
0 < i < 10
# Generated builder
X.and_(X.lt_(0, i), X.lt_(i, 10))