Expand description
libnrt loader. We need three symbols — nrt_init,
nrt_get_total_nc_count, and nrt_get_version — and a best-effort
read of the Neuron-specific env vars that AWS containers set.
drop(sym) on a libloading::Symbol ends the borrow on its Library;
Symbol doesn’t impl Drop but the lifetime parameter does the work.
Structs§
- Loaded
- Resolved
libnrtstate: core count, version, and optional entry points.
Enums§
- Neuron
Gen - Neuron hardware generation, inferred from instance type or runtime version.
Constants§
- NRT_
SUCCESS - Success status (
NRT_SUCCESS).
Functions§
- detect_
generation - Best-effort generation detection. Prefers
NEURON_INSTANCE_TYPEenv hint (commonly set by AWS Deep Learning AMIs + containers), falls back to the Neuron runtime major version. - is_
available - Returns
trueiflibnrtloaded and initialised. - total_
cores - Total NeuronCores from
nrt_get_total_nc_count, or0iflibnrtis unavailable. - version
- Runtime version string from
nrt_get_version, if available.
Type Aliases§
- NrtAdd
Tensor ToSet Fn - Signature of
nrt_add_tensor_to_tensor_set. - NrtAlloc
Tensor SetFn - Signature of
nrt_allocate_tensor_set. - NrtExecute
Fn - Signature of
nrt_execute. - NrtFree
Tensor SetFn - Signature of
nrt_free_tensor_set. - NrtLoad
Fn - Signature of
nrt_load. - NrtModel
Handle - Opaque
nrt_model_thandle. - NrtStatus
NRT_STATUSreturn code from the Neuron runtime.- NrtTensor
Handle - Opaque
nrt_tensor_thandle. - NrtTensor
SetHandle - Opaque
nrt_tensor_set_thandle. - NrtUnload
Fn - Signature of
nrt_unload.