docs.rs failed to build rlx-onnx-0.2.5
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.
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.
rlx-onnx
Run ONNX (.onnx) models on RLX backends. Default path: import via
rlx-onnx-import, compile with
rlx-runtime Session, execute on CPU / Metal / CUDA /
ROCm / MLX / wgpu. Optional ONNX Runtime (ort) backend for parity and
execution-provider fallback.
Install
[]
= { = "0.2", = true, = ["cpu"] }
# GPU backends (pick what your host supports)
# rlx-onnx = { version = "0.2", features = ["cuda"] }
# rlx-onnx = { version = "0.2", features = ["metal", "mlx"] }
# ORT fallback + EPs
# rlx-onnx = { version = "0.2", features = ["ort-fallback", "ort-cuda"] }
From the rlx prelude:
= { = "0.2", = ["cpu", "onnx"] }
Usage
use ;
use Device;
let mut model = load_native?;
model.print_io;
let inputs = model.zero_inputs_sized?;
let outputs = model.run?;
OnnxCompileLevel— maps ONNX graph-opt tiers 0–3 toCompileOptions(DCE / constant folding / full pipeline).OnnxExecBackend::Native(default) — RLX compile + execute.OnnxExecBackend::Ort— requiresortorort-fallbackfeature.
CLI
# List inputs/outputs only
# ORT path (rebuild with ort-fallback)
Features
| Feature | Purpose |
|---|---|
native (default) |
RLX import + compile path |
cpu / cuda / metal / mlx / rocm / gpu |
Delegate to rlx-runtime backend |
ort / ort-fallback |
ONNX Runtime session |
ort-cuda, ort-coreml, ort-rocm, ort-directml |
ORT execution providers |
all-ep |
Convenience bundle of GPU + ORT EPs |
Tests
License
GPL-3.0-only.