Skip to main content

ErrorCode

Enum ErrorCode 

Source
#[repr(i32)]
pub enum ErrorCode { kSUCCESS = 0, kUNSPECIFIED_ERROR = 1, kINTERNAL_ERROR = 2, kINVALID_ARGUMENT = 3, kINVALID_CONFIG = 4, kFAILED_ALLOCATION = 5, kFAILED_INITIALIZATION = 6, kFAILED_EXECUTION = 7, kFAILED_COMPUTATION = 8, kINVALID_STATE = 9, kUNSUPPORTED_STATE = 10, }
Expand description

! ! \enum ErrorCode ! ! \brief Error codes that can be returned by TensorRT during execution. !

Variants§

§

kSUCCESS = 0

! ! Execution completed successfully. !

§

kUNSPECIFIED_ERROR = 1

! ! An error that does not fall into any other category. This error is included for forward compatibility. !

§

kINTERNAL_ERROR = 2

! ! A non-recoverable TensorRT error occurred. TensorRT is in an invalid internal state when this error is ! emitted and any further calls to TensorRT will result in undefined behavior. !

§

kINVALID_ARGUMENT = 3

! ! An argument passed to the function is invalid in isolation. ! This is a violation of the API contract. !

§

kINVALID_CONFIG = 4

! ! An error occurred when comparing the state of an argument relative to other arguments. For example, the ! dimensions for concat differ between two tensors outside of the channel dimension. This error is triggered ! when an argument is correct in isolation, but not relative to other arguments. This is to help to distinguish ! from the simple errors from the more complex errors. ! This is a violation of the API contract. !

§

kFAILED_ALLOCATION = 5

! ! An error occurred when performing an allocation of memory on the host or the device. ! A memory allocation error is normally fatal, but in the case where the application provided its own memory ! allocation routine, it is possible to increase the pool of available memory and resume execution. !

§

kFAILED_INITIALIZATION = 6

! ! One, or more, of the components that TensorRT relies on did not initialize correctly. ! This is a system setup issue. !

§

kFAILED_EXECUTION = 7

! ! An error occurred during execution that caused TensorRT to end prematurely, either an asynchronous error, ! user cancellation, or other execution errors reported by CUDA/DLA. In a dynamic system, the ! data can be thrown away and the next frame can be processed or execution can be retried. ! This is either an execution error or a memory error. !

§

kFAILED_COMPUTATION = 8

! ! An error occurred during execution that caused the data to become corrupted, but execution finished. Examples ! of this error are NaN squashing or integer overflow. In a dynamic system, the data can be thrown away and the ! next frame can be processed or execution can be retried. ! This is either a data corruption error, an input error, or a range error. ! This is not used in safety but may be used in standard. !

§

kINVALID_STATE = 9

! ! TensorRT was put into a bad state by incorrect sequence of function calls. An example of an invalid state is ! specifying a layer to be DLA only without GPU fallback, and that layer is not supported by DLA. This can occur ! in situations where a service is optimistically executing networks for multiple different configurations ! without checking proper error configurations, and instead throwing away bad configurations caught by TensorRT. ! This is a violation of the API contract, but can be recoverable. ! ! Example of a recovery: ! GPU fallback is disabled and conv layer with large filter(63x63) is specified to run on DLA. This will fail due ! to DLA not supporting the large kernel size. This can be recovered by either turning on GPU fallback ! or setting the layer to run on the GPU. !

§

kUNSUPPORTED_STATE = 10

! ! An error occurred due to the network not being supported on the device due to constraints of the hardware or ! system. An example is running an unsafe layer in a safety certified context, or a resource requirement for the ! current network is greater than the capabilities of the target device. The network is otherwise correct, but ! the network and hardware combination is problematic. This can be recoverable. ! Examples: ! * Scratch space requests larger than available device memory and can be recovered by increasing allowed ! workspace size. ! * Tensor size exceeds the maximum element count and can be recovered by reducing the maximum batch size. !

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> ErrorCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ErrorCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ErrorCode

Source§

fn cmp(&self, other: &ErrorCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ErrorCode

Source§

fn eq(&self, other: &ErrorCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ErrorCode

Source§

fn partial_cmp(&self, other: &ErrorCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for ErrorCode

Source§

impl Eq for ErrorCode

Source§

impl StructuralPartialEq for ErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.