catalyst.CompileOptions¶
- class CompileOptions(verbose: typing.Optional[bool] = False, logfile: typing.Optional[_io.TextIOWrapper] = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, target: typing.Optional[str] = 'binary', keep_intermediate: typing.Optional[bool] = False, pipelines: typing.Optional[typing.List[typing.Any]] = None, autograph: typing.Optional[bool] = False, autograph_include: typing.Optional[typing.Iterable[str]] = (), async_qnodes: typing.Optional[bool] = False, static_argnums: typing.Optional[typing.Union[int, typing.Iterable[int]]] = None, abstracted_axes: typing.Optional[typing.Union[typing.Iterable[typing.Iterable[str]], typing.Dict[int, str]]] = None, lower_to_llvm: typing.Optional[bool] = True, checkpoint_stage: typing.Optional[str] = '', disable_assertions: typing.Optional[bool] = False, seed: typing.Optional[int] = None)[source]¶
Bases:
object
Generic compilation options, for which reasonable default values exist.
- Parameters
verbose (Optional[bool]) – flag indicating whether to enable verbose output. Default is
False
logfile (Optional[TextIOWrapper]) – the logfile to write output to. Default is
sys.stderr
keep_intermediate (Optional[bool]) – flag indicating whether to keep intermediate results. Default is
False
pipelines (Optional[List[Tuple[str,List[str]]]]) – A list of tuples. The first entry of the tuple corresponds to the name of a pipeline. The second entry of the tuple corresponds to a list of MLIR passes.
autograph (Optional[bool]) – flag indicating whether experimental autograph support is to be enabled.
autograph_include (Optional[Iterable[str]]) – A list of (sub)modules to be allow-listed
conversion. (for autograph) –
async_qnodes (Optional[bool]) – flag indicating whether experimental asynchronous execution of QNodes support is to be enabled.
lower_to_llvm (Optional[bool]) – flag indicating whether to attempt the LLVM lowering after the main compilation pipeline is complete. Default is
True
.static_argnums (Optional[Union[int, Iterable[int]]]) – indices of static arguments. Default is
None
.abstracted_axes (Optional[Any]) – store the abstracted_axes value. Defaults to
None
.disable_assertions (Optional[bool]) – disables all assertions. Default is
False
.seed (Optional[int]) – the seed for random operations in a qjit call. Default is None.
Attributes
- abstracted_axes: Optional[Union[Iterable[Iterable[str]], Dict[int, str]]] = None¶
- async_qnodes: Optional[bool] = False¶
- autograph: Optional[bool] = False¶
- autograph_include: Optional[Iterable[str]] = ()¶
- checkpoint_stage: Optional[str] = ''¶
- disable_assertions: Optional[bool] = False¶
- keep_intermediate: Optional[bool] = False¶
- logfile: Optional[_io.TextIOWrapper] = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>¶
- lower_to_llvm: Optional[bool] = True¶
- pipelines: Optional[List[Any]] = None¶
- seed: Optional[int] = None¶
- static_argnums: Optional[Union[int, Iterable[int]]] = None¶
- target: Optional[str] = 'binary'¶
- verbose: Optional[bool] = False¶
Methods
Get effective pipelines