fhelium.compile.passes.lowering._core
Define the public records and registry for shared CKKS lowering.
LoweredCkksOperation
class View source
python
LoweredCkksOperation(operations: tuple[Operation, ...], result: SSAValue, material_descriptions: dict[str, dict[str, object]] = field(default_factory=dict))1
Hold replacement operations and the logical result of one CKKS op.
Attributes
| Name | Type | Default/value |
|---|---|---|
operations | tuple[Operation, ...] | |
result | SSAValue | |
material_descriptions | dict[str, dict[str, object]] | field(default_factory=dict) |
CkksLowering
data View source
python
CkksLowering = Callable[[Operation, CkksConfig | None, 'Compilation'], LoweredCkksOperation]1
CkksLoweringDefinition
class View source
python
CkksLoweringDefinition(name: str, operation_type: type[Operation], lower: CkksLowering, is_default: bool = False)1
Declare one named CKKS lowering beside its implementation.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | |
operation_type | type[Operation] | |
lower | CkksLowering | |
is_default | bool | False |
CkksLoweringRegistry
class View source
python
CkksLoweringRegistry(definitions: Sequence[CkksLoweringDefinition]=(), *, operation_specs: OperationSpecRegistry=DEFAULT_OPERATION_SPECS)1
Resolve implementation-local lowerings by operation class and name.
supports
method
python
def supports(operation: Operation) -> bool: ...1
Return whether one operation has a registered CKKS lowering.
definitions
property
python
definitions: tuple[CkksLoweringDefinition, ...]1
Return lowering declarations in registry order.
operation_types
property
python
operation_types: tuple[type[Operation], ...]1
Return CKKS operation classes with shared lowering definitions.
available
method
python
def available(operation_type: type[Operation]) -> tuple[str, ...]: ...1
Return registered lowering names for one operation class.
resolve
method
python
def resolve(operation_type: type[Operation], requested: str | None=None) -> CkksLoweringDefinition: ...1
Resolve a requested, default, or unambiguous lowering.
lower
method
python
def lower(operation: Operation, config: CkksConfig | None, compilation: Compilation, *, requested: str | None=None) -> LoweredCkksOperation: ...1
Apply one selected lowering without choosing an implementation.