fhelium.benchmarks.v1.polynomial
Fixed affine and degree-four polynomial methods for Benchmark v1.
CORRECTNESS_LIMITS
constant View source
python
CORRECTNESS_LIMITS = {'affine-d1-balanced': 8e-06, 'dense-power-d4-balanced': 1.4e-05, 'dense-power-d4-horner': 1.2e-05, 'dense-power-d4-paterson-stockmeyer-k2': 1.2e-05}1
DEFINITION
constant View source
python
DEFINITION = register_benchmark(BenchmarkDefinition(name='polynomial-evaluation', title='Affine and degree-four polynomial methods', category='local device', description='Compares four fixed affine and degree-four methods on one identical CPU/CUDA plan.', profiles=(BenchmarkProfile('core', 'Complete fixed cross-backend polynomial method matrix.', _PARAMETERS),), runner=cast(Any, _run_polynomial), workload_id='polynomial-evaluation'))1
NTT_BACKEND
constant View source
python
NTT_BACKEND = 'radix2_indexed'1
PRESET
constant View source
python
PRESET = fh.Preset.slots8192_scale40_levels7_int64.value1
plaintext_oracle
function View source
python
def plaintext_oracle(polynomial: bs.PolynomialApproximation, values: torch.Tensor) -> torch.Tensor: ...1
polynomial_definition
function View source
python
def polynomial_definition(polynomial_id: str='dense-power-d4') -> bs.PolynomialApproximation: ...1
polynomial_inputs
function View source
python
def polynomial_inputs(num_slots: int) -> torch.Tensor: ...1
polynomial_method_cases
function View source
python
def polynomial_method_cases() -> tuple[_MethodCase, ...]: ...1