fhelium.compile._lower_and_fuse
Compose semantic lowering, local execution selection, and operation fusion.
default_lower_and_fuse_pipeline
function View source
def default_lower_and_fuse_pipeline(backend: OperationBackend | None=None, *, resources: CkksDeviceResources | RnsContext | NttContext | Iterable[CkksDeviceResources | RnsContext | NttContext]=(), keys: Mapping[object, object] | Iterable[object] | EvaluationKeySet=()) -> Pipeline: ...Build the default lowering-and-fusion recipe for a mixed-level Program.
The returned Pipeline is an ordinary editable value. Known Tensor facts are read from supplied bindings; no callable signature, Engine, data factory or device-wide routing policy participates. Explicit CKKS state transitions remain authoritative. High-level encrypted arithmetic uses the existing logical/CKKS passes and propagates represented entry state. No rescale or relinearization is inserted by this baseline recipe; callers can insert those scheduling passes before depth and scale assignment.
Optional resources and keys supply numerical data through the existing operand-preparation stage. Every pass reads the current Compilation's single material dictionary; bindings are available before dependent fusion choices. Missing keys stay unresolved and are never generated.
Lowerings are chosen per operation using the registered implementations and their fusion support. The policy does not benchmark alternatives or retry failed execution through another implementation. Missing preparation facts can remain in the optimized Program until execution linking needs them.