Skip to main content

Crate ironaccelerator_neuron

Crate ironaccelerator_neuron 

Source
Expand description

§ironaccelerator-neuron

AWS Neuron backend — covers Trainium (trn1 / trn2) and Inferentia (inf1 / inf2). The Neuron Runtime exposes a C API through libnrt.so; we dynamically load it and call nrt_init + nrt_get_total_nc_count for device enumeration. NeuronCores are the scheduling unit Neuron exposes, so each NeuronCore becomes one DeviceDescriptor.

Instance family is read from AWS metadata-style env hints where available (NEURON_RT_VISIBLE_CORES, AWS_NEURON_VISIBLE_CORES, instance-type file under /sys/devices/virtual/dmi/id/product_name when root is reachable); generation is inferred from the runtime version string.

Re-exports§

pub use backend::NeuronBackend;
pub use backend::NEURON_BACKEND;

Modules§

backend
AWS Neuron Backend impl. One descriptor per NeuronCore.
drv
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.
runtime
Thin wrappers over nrt_load / nrt_execute. The AWS Neuron Runtime takes a NEFF binary (produced by the Neuron compiler) plus two tensor sets (inputs + outputs) and runs it on one or more NeuronCores. We don’t ship the compiler — we expect the caller to have a .neff already.

Functions§

register