fhelium.native.runtime
Native Torch operator loading and runtime ABI validation.
NativeExtensionError
class View source
NativeExtensionError()Bases: ImportError
Raised when native operators are unavailable or ABI-incompatible.
NativeStatus
class View source
NativeStatus(available: bool, reason: str, details: tuple[str, ...], binary_path: Path, manifest_path: Path, backends: tuple[str, ...])Native-extension availability and diagnostic paths for this runtime.
available is true only after binary discovery, ABI-manifest validation, PyTorch loading, and FakeTensor registration succeed. reason and details explain the recorded result without triggering a new load.
Attributes
| Name | Type | Default/value |
|---|---|---|
available | bool | |
reason | str | |
details | tuple[str, ...] | |
binary_path | Path | |
manifest_path | Path | |
backends | tuple[str, ...] |
native_available
function View source
def native_available() -> bool: ...Return whether native operators loaded successfully for this runtime.
native_backend_available
function View source
def native_backend_available(backend: str) -> bool: ...Return whether the loaded extension implements backend.
native_status
function View source
def native_status() -> NativeStatus: ...Return the immutable native-extension status recorded during import.
require_native
function View source
def require_native() -> None: ...Raise NativeExtensionError unless native operators are available.
require_native_backend
function View source
def require_native_backend(backend: str) -> None: ...Raise unless the loaded extension implements backend.