Files
concrete/docs/dev/api/concrete.fhe.compilation.compiler.md

149 lines
4.1 KiB
Markdown

<!-- markdownlint-disable -->
<a href="../../frontends/concrete-python/concrete/fhe/compilation/compiler.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
# <kbd>module</kbd> `concrete.fhe.compilation.compiler`
Declaration of `Compiler` class.
---
<a href="../../frontends/concrete-python/concrete/fhe/compilation/compiler.py#L32"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
## <kbd>class</kbd> `EncryptionStatus`
EncryptionStatus enum, to represent encryption status of parameters.
---
<a href="../../frontends/concrete-python/concrete/fhe/compilation/compiler.py#L42"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
## <kbd>class</kbd> `Compiler`
Compiler class, to glue the compilation pipeline.
<a href="../../frontends/concrete-python/concrete/fhe/compilation/compiler.py#L108"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
### <kbd>method</kbd> `__init__`
```python
__init__(
function: Callable,
parameter_encryption_statuses: Dict[str, Union[str, EncryptionStatus]]
)
```
---
<a href="../../frontends/concrete-python/concrete/fhe/compilation/compiler.py#L61"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
### <kbd>method</kbd> `assemble`
```python
assemble(
function: Callable,
parameter_values: Dict[str, ValueDescription],
configuration: Optional[Configuration] = None,
artifacts: Optional[DebugArtifacts] = None,
**kwargs
) Circuit
```
Assemble a circuit from the raw parameter values, used in direct circuit definition.
**Args:**
function (Callable): function to convert to a circuit
parameter_values (Dict[str, ValueDescription]): parameter values of the function
configuration(Optional[Configuration], default = None): configuration to use
artifacts (Optional[DebugArtifacts], default = None): artifacts to store information about the process
kwargs (Dict[str, Any]): configuration options to overwrite
**Returns:**
Circuit: assembled circuit
---
<a href="../../frontends/concrete-python/concrete/fhe/compilation/compiler.py#L414"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
### <kbd>method</kbd> `compile`
```python
compile(
inputset: Optional[Iterable[Any], Iterable[Tuple[Any, ]]] = None,
configuration: Optional[Configuration] = None,
artifacts: Optional[DebugArtifacts] = None,
**kwargs
) Circuit
```
Compile the function using an inputset.
**Args:**
inputset (Optional[Union[Iterable[Any], Iterable[Tuple[Any, ...]]]]): optional inputset to extend accumulated inputset before bounds measurement
configuration(Optional[Configuration], default = None): configuration to use
artifacts (Optional[DebugArtifacts], default = None): artifacts to store information about the process
kwargs (Dict[str, Any]): configuration options to overwrite
**Returns:**
Circuit: compiled circuit
---
<a href="../../frontends/concrete-python/concrete/fhe/compilation/compiler.py#L312"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
### <kbd>method</kbd> `trace`
```python
trace(
inputset: Optional[Iterable[Any], Iterable[Tuple[Any, ]]] = None,
configuration: Optional[Configuration] = None,
artifacts: Optional[DebugArtifacts] = None,
**kwargs
) Graph
```
Trace the function using an inputset.
**Args:**
inputset (Optional[Union[Iterable[Any], Iterable[Tuple[Any, ...]]]]): optional inputset to extend accumulated inputset before bounds measurement
configuration(Optional[Configuration], default = None): configuration to use
artifacts (Optional[DebugArtifacts], default = None): artifacts to store information about the process
kwargs (Dict[str, Any]): configuration options to overwrite
**Returns:**
Graph: computation graph representing the function prior to MLIR conversion