Skip to main content

atomr_accel_tensorrt/
error.rs

1//! Error types for the TensorRT actor surface.
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum TrtError {
7    #[error("libnvinfer not available: {0}")]
8    NotLinked(&'static str),
9
10    #[error("TensorRT builder failed: {0}")]
11    Build(String),
12
13    #[error("TensorRT runtime failed: {0}")]
14    Runtime(String),
15
16    #[error("TensorRT engine pointer was null")]
17    NullEngine,
18
19    #[error("TensorRT execution context error: {0}")]
20    Execution(String),
21
22    #[error("ONNX parser error: {0}")]
23    Onnx(String),
24
25    #[error("INT8 calibrator error: {0}")]
26    Calibration(String),
27
28    #[error("plugin error: {0}")]
29    Plugin(String),
30
31    #[error("refit error: {0}")]
32    Refit(String),
33
34    #[error("invalid argument: {0}")]
35    InvalidArg(String),
36}