Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
neuronx-rs
Rust bindings for libnrt, the AWS Neuron runtime used on Inferentia2 and Trainium instances.
The neuronx crate is a thin layer on top of the C API: raw bindgen bindings
in neuronx::sys, plus RAII wrappers for the runtime, models (NEFF files),
tensors and tensor sets. It does not compile anything, use neuronx-cc to
produce a NEFF, e.g. from a StableHLO module:
use ;
let rt = new?;
let model = rt.load?;
let x = rt.tensor_from_slice?;
let out = rt.allocate?;
let mut inputs = new?;
inputs.add?;
let mut outputs = new?;
outputs.add?;
model.execute?;
let out: = out.to_vec?;
Model::tensor_info returns the names, shapes and dtypes of the NEFF inputs
and outputs.
Setup
The build needs the aws-neuronx-runtime-lib package, which installs the
headers and libnrt.so in /opt/aws/neuron. Set NEURON_DIR to use another
location. bindgen also needs libclang.
Running needs a Neuron device and the aws-neuronx-dkms driver. The tests
compile a small StableHLO module when neuronx-cc is on the PATH (or set
NEURONX_CC), and skip that test otherwise.