fhelium.backend.rns.key_product
Montgomery products with indexed key-digit Tensor operands.
NativeKeySwitchDigitProductImplementation
class View source
python
NativeKeySwitchDigitProductImplementation(name: str = 'native-key-switch-digit-product', supports_in_place: bool = False, operation_types: tuple[type[Operation], ...] = (rns.KeySwitchDigitProductOp,))1
Multiply one NTT QP digit by an evaluation-key digit.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | 'native-key-switch-digit-product' |
supports_in_place | bool | False |
operation_types | tuple[type[Operation], ...] | (rns.KeySwitchDigitProductOp,) |
resource_requirements
method
python
def resource_requirements(invocation: OperationInvocation) -> tuple[ResourceRequirement, ...]: ...1
execute
method
python
def execute(invocation: OperationInvocation, values: tuple[torch.Tensor, ...], resources: tuple[BoundResource, ...], *, in_place: bool) -> tuple[torch.Tensor, ...]: ...1