Pure builtins¶
The pure-expression builtins the QIEC lowering resolves by type.
Internal module
This module is an implementation detail of the compiler and its
tooling. Its __all__ is empty, so none of the names below are
part of the public API, and they may change without notice.
pure_builtins
¶
The pure-expression builtins the QIEC lowering resolves by type.
Operators and builtin applications in program let steps and in QIEC
values resolve to primitives of the closed registry by their operand
types; reductions and last-axis operations resolve to their own terms.
The tables here are the checked, portable registry shared by QIEC lowering
and program elaboration. The eager PyTorch compiler has a deliberately larger
native extension table; names in that extension do not become checked QIEC
primitives implicitly.
BuiltinSpec
dataclass
¶
BuiltinSpec(name: str, eager: Callable | None, eager_arities: frozenset[int], qiec_arities: frozenset[int], purity: Literal['pure', 'random'], shape_rule: str, qiec_form: QiecBuiltinForm, qiec_overloads: Mapping[tuple[TypeExpr, ...], str], qiec_operator: ReductionOperator | RowwiseOperator | None, targets: frozenset[str])
One source builtin's eager and checked capabilities.
qiec_form records how checked lowering consumes the call. filter
deliberately has the unsupported form: it is a known surface operation
with a stable dynamic-shape diagnostic, not an accidentally unknown name.