fhelium.benchmarks.suite.workloads
Prepared Eager operations and packed matrix products for the suite.
PreparedWorkload
class View source
python
PreparedWorkload(evaluate: Callable[[], Ciphertext | tuple[Ciphertext, ...] | torch.Tensor], decode: Callable[[Ciphertext | tuple[Ciphertext, ...] | torch.Tensor], torch.Tensor], expected: torch.Tensor, key_bytes: int, input_scale: float | None, output_depth: int, output_domain: str | None = None)1
A timed callable with its untimed decoding oracle and retained key size.
Attributes
| Name | Type | Default/value |
|---|---|---|
evaluate | Callable[[], Ciphertext | tuple[Ciphertext, ...] | torch.Tensor] | |
decode | Callable[[Ciphertext | tuple[Ciphertext, ...] | torch.Tensor], torch.Tensor] | |
expected | torch.Tensor | |
key_bytes | int | |
input_scale | float | None | |
output_depth | int | |
output_domain | str | None | None |
WorkloadInputs
class View source
python
WorkloadInputs(config: CkksConfig, device: torch.device)1
One configuration's Engine, secret and reusable evaluation keys.
relin
property
python
relin: RelinearizationKey1
rotation
method
python
def rotation(step: int) -> RotationKey: ...1
key_bytes
method
python
def key_bytes(steps: list[int], *, relin: bool=False) -> int: ...1
decrypt
method
python
def decrypt(output: Ciphertext | tuple[Ciphertext, ...] | torch.Tensor) -> torch.Tensor: ...1
prepare
method
python
def prepare(cell: SuiteCell) -> PreparedWorkload: ...1
primitive
method
python
def primitive(cell: SuiteCell) -> PreparedWorkload: ...1
ntt
method
python
def ntt(cell: SuiteCell) -> PreparedWorkload: ...1
key_switch
method
python
def key_switch(cell: SuiteCell) -> PreparedWorkload: ...1
operation
method
python
def operation(cell: SuiteCell) -> PreparedWorkload: ...1
polynomial
method
python
def polynomial(cell: SuiteCell) -> PreparedWorkload: ...1
matrix
method
python
def matrix(cell: SuiteCell) -> PreparedWorkload: ...1