bloqade.lanes.prelude.kernel
← Module overview
function
source
functionkernel¶source
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
| Name | Type | Default | Description |
|---|---|---|---|
py_func | — | None | Python function to compile; omit when using the decorator with options. |
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 |