fhelium.compile.passes.backend._prepare_operands
Prepare missing Tensor operands declared by selected whole implementations.
PrepareOperationOperandsPass
class View source
python
PrepareOperationOperandsPass(registry: OperationImplementationRegistry, resources: CkksDeviceResources | RnsContext | NttContext | Iterable[CkksDeviceResources | RnsContext | NttContext] = (), keys: Mapping[object, object] | Iterable[object] | EvaluationKeySet = (), name: str = 'prepare-operation-operands')1
Ask selected implementations for missing parameter Tensor requirements.
A Backend's optional tensor_requirements(operation, config) returns operation attributes and named material descriptions. This pass adds only missing operands; supplied Tensors, assignments, and existing symbols remain unchanged. Optional caller-supplied resources and keys populate missing entries in the current Compilation's material table through the shared preparation utility. No keys are generated. Implementations can defer requirements when execution facts are insufficient.
Attributes
| Name | Type | Default/value |
|---|---|---|
registry | OperationImplementationRegistry | |
resources | CkksDeviceResources | RnsContext | NttContext | Iterable[CkksDeviceResources | RnsContext | NttContext] | () |
keys | Mapping[object, object] | Iterable[object] | EvaluationKeySet | () |
name | str | 'prepare-operation-operands' |
run
method
python
def run(compilation: 'Compilation') -> PassResult: ...1