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) -> Pipeline: ...Build an editable lowering-and-fusion pipeline for a mixed-level Program.
The recipe lowers high-level encrypted arithmetic, propagates represented entry state, removes dead values, hoists compatible rotations, reuses internal pure computations, and selects supported fusion regions. Supplied CKKS transitions are preserved. Rescale and relinearization scheduling require caller-added passes before depth and scale assignment.
The selected registry is shared through CompileWorkspace. Lowering and implementation selection complete their operation material declarations using that registry and the workspace's optional key_layouts mapping. Passes read available Tensor facts from the Compilation's material bindings.
Lowerings are selected per operation from registered implementations and their fusion support. Selection uses represented operation and layout facts. Missing preparation facts may remain in the optimized Program until linking requires them.