fhelium.benchmarks.v1.matrix
Fixed local-device dense matrix workloads for Benchmark v1.
CORRECTNESS_ATOL
constant View source
python
CORRECTNESS_ATOL = 3e-051
CTCT_DEFINITION
constant View source
python
CTCT_DEFINITION = register_benchmark(_definition('ctct'))1
INPUT_SEED
constant View source
python
INPUT_SEED = 202608071
MATRIX_SIZE
constant View source
python
MATRIX_SIZE = 161
NTT_BACKEND
constant View source
python
NTT_BACKEND = 'radix2_indexed'1
PRESET
constant View source
python
PRESET = fh.Preset.slots8192_scale40_levels7_int641
PTCT_DEFINITION
constant View source
python
PTCT_DEFINITION = register_benchmark(_definition('ptct'))1
cyclic_diagonal_slots
function View source
python
def cyclic_diagonal_slots(matrix: torch.Tensor, rotation_step: int, num_slots: int=8192) -> torch.Tensor: ...1
evaluate_ctct_column
function View source
python
def evaluate_ctct_column(engine: fh.CkksEngine, source: fh.Ciphertext, diagonal_ciphertexts_ntt: Sequence[fh.Ciphertext], rotation_keys: Mapping[int, fh.RotationKey], relinearization_key: fh.RelinearizationKey) -> fh.Ciphertext: ...1
evaluate_ptct_column
function View source
python
def evaluate_ptct_column(engine: fh.CkksEngine, source: fh.Ciphertext, diagonal_batch: fh.Plaintext, rotation_keys: Mapping[int, fh.RotationKey]) -> fh.Ciphertext: ...1
expected_periodic_output
function View source
python
def expected_periodic_output(lhs: torch.Tensor, rhs: torch.Tensor, *, num_slots: int=8192) -> torch.Tensor: ...1
matrix_inputs
function View source
python
def matrix_inputs(*, seed: int=INPUT_SEED) -> tuple[torch.Tensor, torch.Tensor]: ...1
periodic_slots
function View source
python
def periodic_slots(values: torch.Tensor, num_slots: int=8192) -> torch.Tensor: ...1