11 KiB
module concrete.fhe.compilation.artifacts
Declaration of DebugArtifacts class.
Global Variables
- TYPE_CHECKING
class DebugManager
A debug manager, allowing streamlined debugging.
method __init__
__init__(config: Configuration)
method debug_assigned_graph
debug_assigned_graph(name, function_graph)
Print assigned graphs if configuration tells so.
method debug_bit_width_assignments
debug_bit_width_assignments(name, function_graph)
Print bitwidth assignments if configuration tells so.
method debug_bit_width_constaints
debug_bit_width_constaints(name, function_graph)
Print bitwidth constraints if configuration tells so.
method debug_computation_graph
debug_computation_graph(name, function_graph)
Print computation graph if configuration tells so.
method debug_mlir
debug_mlir(mlir_str)
Print mlir if configuration tells so.
method debug_statistics
debug_statistics(module)
Print statistics if configuration tells so.
method debug_table
debug_table(title: str, activate: bool = True)
Return a context manager that prints a table around what is printed inside the scope.
method show_assigned_graph
show_assigned_graph() → bool
Tell if the configuration involves showing assigned graph.
method show_bit_width_assignments
show_bit_width_assignments() → bool
Tell if the configuration involves showing bitwidth assignments.
method show_bit_width_constraints
show_bit_width_constraints() → bool
Tell if the configuration involves showing bitwidth constraints.
method show_graph
show_graph() → bool
Tell if the configuration involves showing graph.
method show_mlir
show_mlir() → bool
Tell if the configuration involves showing mlir.
method show_optimizer
show_optimizer() → bool
Tell if the configuration involves showing optimizer.
method show_statistics
show_statistics() → bool
Tell if the configuration involves showing statistics.
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: Optional[List[str]] = None,
output_directory: Union[str, Path] = PosixPath('.artifacts')
)
property client_parameters
The client parameters associated with the execution runtime.
method add_execution_runtime
add_execution_runtime(execution_runtime: 'Lazy[ExecutionRt]')
Add the (lazy) execution runtime to get the client parameters if needed.
Args: execution_runtime (Lazy[ExecutionRt]): The lazily initialized execution runtime.
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 export
export()
Export the collected information to self.output_directory.