fhelium.backend.rns.basis_extension
Centered mixed-radix extension between ordered residue bases.
centered_basis_extend
function View source
python
def centered_basis_extend(source: torch.Tensor, tensors: Mapping[str, torch.Tensor]) -> torch.Tensor: ...1
Return residues of centered CRT(source) in the supplied target basis.
Input layout is [*batch, source row, coefficient]. Numerical operands bind the source and target moduli, Garner normalizers/propagation, extension coefficients, centered threshold and source-product correction. The output uses [*batch, target row, coefficient], standard residues and owned storage.
NativeCenteredBasisExtensionImplementation
class View source
python
NativeCenteredBasisExtensionImplementation(name: str = 'native-centered-basis-extension', operation_types: tuple = (rns.CenteredBasisExtendOp,), supports_in_place: bool = False)1
Execute centered CRT extension from supplied numerical Tensor operands.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | 'native-centered-basis-extension' |
operation_types | tuple | (rns.CenteredBasisExtendOp,) |
supports_in_place | bool | False |
resource_requirements
method
python
def resource_requirements(invocation): ...1
execute
method
python
def execute(invocation, inputs, resources, *, in_place): ...1