Files
concrete/docs/dev/api/concrete.fhe.compilation.artifacts.md
Benoit Chevallier-Mames 2424352dbf docs(compiler): update apidocs
2024-04-15 09:37:48 +02:00

8.2 KiB

module concrete.fhe.compilation.artifacts

Declaration of DebugArtifacts class.


class FunctionDebugArtifacts

An object containing debug artifacts for a certain function in an fhe module.

method __init__

__init__()

method add_graph

add_graph(name: str, graph: Graph)

Add a representation of the function being compiled.

Args: name (str): name of the graph (e.g., initial, optimized, final)

graph (Graph): a representation of the function being compiled


method add_parameter_encryption_status

add_parameter_encryption_status(name: str, encryption_status: str)

Add parameter encryption status of a parameter of the function being compiled.

Args: name (str): name of the parameter

encryption_status (str): encryption status of the parameter


method add_source_code

add_source_code(function: Union[str, Callable])

Add source code of the function being compiled.

Args: function (Union[str, Callable]): either the source code of the function or the function itself


class ModuleDebugArtifacts

An object containing debug artifacts for an fhe module.

method __init__

__init__(
    function_names: List[str],
    output_directory: Union[str, Path] = PosixPath('.artifacts')
)

method add_client_parameters

add_client_parameters(client_parameters: bytes)

Add client parameters used.

Args:

  • client_parameters (bytes): client parameters

method add_mlir_to_compile

add_mlir_to_compile(mlir: str)

Add textual representation of the resulting MLIR.

Args: mlir (str): textual representation of the resulting MLIR


method export

export()

Export the collected information to self.output_directory.


class DebugArtifacts

DebugArtifacts class, to export information about the compilation process for single function.

method __init__

__init__(output_directory: Union[str, Path] = PosixPath('.artifacts'))

property mlir_to_compile

Return the mlir string.


property output_directory

Return the directory to export artifacts to.


method add_client_parameters

add_client_parameters(client_parameters: bytes)

Add client parameters used.

Args:

  • client_parameters (bytes): client parameters

method add_graph

add_graph(name: str, graph: Graph)

Add a representation of the function being compiled.

Args: name (str): name of the graph (e.g., initial, optimized, final)

graph (Graph): a representation of the function being compiled


method add_mlir_to_compile

add_mlir_to_compile(mlir: str)

Add textual representation of the resulting MLIR.

Args: mlir (str): textual representation of the resulting MLIR


method add_parameter_encryption_status

add_parameter_encryption_status(name: str, encryption_status: str)

Add parameter encryption status of a parameter of the function being compiled.

Args: name (str): name of the parameter

encryption_status (str): encryption status of the parameter


method add_source_code

add_source_code(function: Union[str, Callable])

Add source code of the function being compiled.

Args: function (Union[str, Callable]): either the source code of the function or the function itself


method export

export()

Export the collected information to self.output_directory.