fhelium.compile._compilation
State carried through one caller-composed compilation.
Compilation
class View source
python
Compilation(program: Program, workspace: CompileWorkspace = field(default_factory=CompileWorkspace), reports: tuple[PassReport, ...] = (), material_bindings: dict[str, torch.Tensor] = field(default_factory=dict))1
Carry one Program and the state accumulated while transforming it.
material_bindings maps Program symbols to live Tensor data. Every pass receives the current Compilation and uses this same dictionary. workspace holds caller inputs and pass-produced data that do not belong in portable IR. reports records the ordered pass history. A Pipeline returns a new Compilation with a transformed Program while retaining the same workspace and binding dictionary. Copy the dictionary when preparing independent assignments; copying it does not copy Tensor storage.
Attributes
| Name | Type | Default/value |
|---|---|---|
program | Program | |
workspace | CompileWorkspace | field(default_factory=CompileWorkspace) |
reports | tuple[PassReport, ...] | () |
material_bindings | dict[str, torch.Tensor] | field(default_factory=dict) |