Skip to content

bloqade.lanes.prelude.kernel

← Module overview

functionkernelsource

bloqade.lanes.prelude.kernel

Signature
def kernel(py_func=None, *, verify: Annotated[bool, Doc('run `verify` before running passes, default is `True`')]=True, typeinfer: Annotated[bool, Doc('run type inference and apply the inferred type to IR, default `False`')]=False, fold: Annotated[bool, Doc('run folding passes')]=True, aggressive: Annotated[bool, Doc('run aggressive folding passes if `fold=True`')]=False, no_raise: Annotated[bool, Doc('do not raise exception during analysis')]=True)

Decorator callable: use the bare decorator or call it with compilation options. The displayed signature exposes the returned pass options, not the internal factory’s self parameter.

Parameters

NameTypeDefaultDescription
py_func—NonePython function to compile; omit when using the decorator with options.
verifyAnnotated[bool, Doc('run `verify` before running passes, default is `True`')]True
typeinferAnnotated[bool, Doc('run type inference and apply the inferred type to IR, default `False`')]False
foldAnnotated[bool, Doc('run folding passes')]True
aggressiveAnnotated[bool, Doc('run aggressive folding passes if `fold=True`')]False
no_raiseAnnotated[bool, Doc('do not raise exception during analysis')]True
source