fhelium.backend.ckks.batch
Stack and select batch items of CKKS value payloads.
BatchImplementation
class View source
python
BatchImplementation(name: str = 'torch-batch', operations: tuple[str, ...] = ('fhelium_ckks.stack_batch', 'fhelium_ckks.select_batch'), supports_in_place: bool = False)1
Stack payloads on a new storage axis, or select one item of a storage axis.
fhelium_ckks.stack_batch stacks its operands on storage axis dim; fhelium_ckks.select_batch returns the view of item index of storage axis dim. A ciphertext payload [component, *batch, row, coefficient] has its first batch axis at storage axis 1, a plaintext payload at storage axis 0.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | 'torch-batch' |
operations | tuple[str, ...] | ('fhelium_ckks.stack_batch', 'fhelium_ckks.select_batch') |
supports_in_place | bool | False |
resource_requirements
method
python
def resource_requirements(invocation: OperationInvocation) -> tuple[ResourceRequirement, ...]: ...1
lower
method
python
def lower(invocation: OperationInvocation, values: tuple[torch.Tensor, ...], resources: tuple[BoundResource, ...], builder: ExecBuilder, /) -> tuple[torch.Tensor, ...]: ...1