Skip to main content

native_onnx/
lib.rs

1#![deny(unsafe_code)]
2#![warn(missing_docs)]
3#![doc = include_str!("lib.md")]
4
5mod api;
6mod buffers;
7mod cuda_graph;
8// The only engine module allowed to call the dynamically loaded CUDA driver.
9#[allow(unsafe_code)]
10mod cuda_transfer;
11mod diagnostics;
12mod engine;
13mod options;
14mod session;
15mod tensor;
16
17pub use anyhow::{Error, Result};
18pub use api::{CompileReport, CompiledFormat, FallbackEvent, ModelInfo, OnnxSession};
19pub use options::{
20    Backend, BackendSelection, CompileOptions, CompileTarget, CudaOptions, OnnxOptions,
21    TensorRtOptions,
22};
23/// Configure additional installed ONNX Runtime providers through [`Backend::Custom`].
24pub use ort::ep;
25pub use tensor::{
26    DType, Tensor, TensorBuffer, TensorData, TensorDataMut, TensorSpec, TensorView, TensorViewMut,
27    bf16, element_count, f16,
28};