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.compiler.compilation_feedback
Compilation feedback.
function tag_from_location
tag_from_location(location)
Extract tag of the operation from its location.
class MoreCircuitCompilationFeedback
Helper class for compilation feedback.
method count
count(
circuit_feedback: CircuitCompilationFeedback,
operations: Set[PrimitiveOperation]
) → int
Count the amount of specified operations in the program.
Args: operations (Set[PrimitiveOperation]): set of operations used to filter the statistics
Returns: int: number of specified operations in the program
method count_per_parameter
count_per_parameter(
circuit_feedback: CircuitCompilationFeedback,
operations: Set[PrimitiveOperation],
key_types: Set[KeyType],
program_info: ProgramInfo
) → Dict[ForwardRef('Parameter'), int]
Count the amount of specified operations in the program and group by parameters.
Args: operations (Set[PrimitiveOperation]): set of operations used to filter the statistics
key_types (Set[KeyType]): set of key types used to filter the statistics
program_info (ProgramInfo): program info required for grouping by parameters
Returns: Dict[Parameter, int]: number of specified operations per parameter in the program
method count_per_tag
count_per_tag(
circuit_feedback: CircuitCompilationFeedback,
operations: Set[PrimitiveOperation]
) → Dict[str, int]
Count the amount of specified operations in the program and group by tags.
Args: operations (Set[PrimitiveOperation]): set of operations used to filter the statistics
Returns: Dict[str, int]: number of specified operations per tag in the program
method count_per_tag_per_parameter
count_per_tag_per_parameter(
circuit_feedback: CircuitCompilationFeedback,
operations: Set[PrimitiveOperation],
key_types: Set[KeyType],
program_info: ProgramInfo
) → Dict[str, Dict[ForwardRef('Parameter'), int]]
Count the amount of specified operations in the program and group by tags and parameters.
Args: operations (Set[PrimitiveOperation]): set of operations used to filter the statistics
key_types (Set[KeyType]): set of key types used to filter the statistics
program_info (ProgramInfo): program info required for grouping by parameters
Returns: Dict[str, Dict[Parameter, int]]: number of specified operations per tag per parameter in the program