fhelium.backend.triton._ntt
Compose generated NTT endpoints and synchronized native middle stages.
A schedule fuses component expressions into transform loads and stores. Each interior stage group retains its native synchronization and scratch storage. Successive transforms materialize the preceding transform's live result while its pointwise consumers can become the next transform's input expressions.
CompactNttExecution
class View source
CompactNttExecution(output_roots: tuple[ValueExpr, ...], outputs: tuple[ValueExpr, ...], transforms: tuple[_Transform, ...], dtype: torch.dtype, device: torch.device)Prepared compact radix-2 execution for one input layout.
Preparation records table operand positions and emits kernels. Execution accepts current Tensor operands, allocates result/scratch storage and launches those kernels; no input or evaluation-key Tensor is retained by the plan.
Attributes
| Name | Type | Default/value |
|---|---|---|
output_roots | tuple[ValueExpr, ...] | |
outputs | tuple[ValueExpr, ...] | |
transforms | tuple[_Transform, ...] | |
dtype | torch.dtype | |
device | torch.device | |
execution_source | str | field(init=False, repr=False, compare=False) |
build
method
def build(graph: BoundGraph, values: tuple[torch.Tensor, ...], tables: tuple[torch.Tensor, ...]) -> CompactNttExecution: ...execute
method
def execute(values: tuple[torch.Tensor, ...], tables: tuple[torch.Tensor, ...]) -> tuple[torch.Tensor, ...]: ...Execute the prepared compact schedule using fresh result and scratch storage.