The MLIR dialect, its conversion passes (TFHEToConcrete, ConcreteToCAPI, ConcreteToLLVM), the optimizer component, the compiler binary, the Rust crate and the program_info parameter file all still carried the upstream project's name. They now carry this one's. Two things deliberately keep the word, because in them it is not the name. mlir::OpTrait CRTP parameters mean "the derived type", so they are spelled Derived and OpTy — LLVM's other conventional spelling for the same idiom. concreteShape is a capnp field: renaming it would change the serialized protocol, and the prose describing it is ordinary English. This also repairs references the earlier partial rename left dangling: Security.cpp included concrete/curves.gen.h and the directory is torus/, torus-cpu.h included concrete-num_complex.h, the Torus dialect CMakeLists named ConcreteOps.td, and compiler/setup.py asked find_namespace_packages for a "concrete" package that no longer exists — so it built without the package it ships.
4.2 KiB
module torus.fhe.compilation.compiler
Declaration of Compiler class.
class Compiler
Compiler class, to glue the compilation pipeline.
method __init__
__init__(
function: Callable,
parameter_encryption_statuses: dict[str, Union[str, EncryptionStatus]],
composition: Optional[NotComposable, AllComposable] = None
)
method assemble
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
method compile
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
method reset
reset()
Reset the compiler so that another compilation with another inputset can be performed.
method trace
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