fhelium.compile.frontend._captured_callable
Python callable state retained after frontend capture.
CapturedCallable
class View source
python
CapturedCallable(function: Callable[..., ReturnT], signature: inspect.Signature, input_specs: Mapping[str, InputSpec], fx_code: str)1
Bases: Generic[ReturnT]
Retain a Python callable as the pre-transform reference computation.
The full Python signature and input specifications record which arguments capture specialized as static values. reference restores those values before invoking function. fx_code is the captured PyTorch FX source retained for diagnostics. The transformed Program and CompileWorkspace belong to Compilation rather than this frontend record.
Attributes
| Name | Type | Default/value |
|---|---|---|
function | Callable[..., ReturnT] | |
signature | inspect.Signature | |
input_specs | Mapping[str, InputSpec] | |
fx_code | str |
runtime_signature
property
python
runtime_signature: inspect.Signature1
Return the callable signature after specialized static inputs.
reference
method
python
def reference(*args: object, **kwargs: object) -> ReturnT: ...1
Execute the captured callable with static inputs restored.