Skip to main content

CudaRtError

Enum CudaRtError 

Source
#[repr(u32)]
pub enum CudaRtError {
Show 122 variants InvalidValue = 1, MemoryAllocation = 2, InitializationError = 3, CudartUnloading = 4, ProfilerDisabled = 5, InvalidConfiguration = 9, InvalidPitchValue = 12, InvalidSymbol = 13, InvalidHostPointer = 16, InvalidDevicePointer = 17, InvalidTexture = 18, InvalidTextureBinding = 19, InvalidChannelDescriptor = 20, InvalidMemcpyDirection = 21, InvalidFilterSetting = 26, InvalidNormSetting = 27, StubLibrary = 34, InsufficientDriver = 35, CallRequiresNewerDriver = 36, InvalidSurface = 37, DuplicateVariableName = 43, DuplicateTextureName = 44, DuplicateSurfaceName = 45, DevicesUnavailable = 46, IncompatibleDriverContext = 49, MissingConfiguration = 52, LaunchMaxDepthExceeded = 65, LaunchFileScopedTex = 66, LaunchFileScopedSurf = 67, SyncDepthExceeded = 68, LaunchPendingCountExceeded = 69, InvalidDeviceFunction = 98, NoDevice = 100, InvalidDevice = 101, DeviceNotLicensed = 102, SoftwareValidityNotEstablished = 103, StartupFailure = 127, InvalidKernelImage = 200, DeviceUninitialized = 201, MapBufferObjectFailed = 205, UnmapBufferObjectFailed = 206, ArrayIsMapped = 207, AlreadyMapped = 208, NoKernelImageForDevice = 209, AlreadyAcquired = 210, NotMapped = 211, NotMappedAsArray = 212, NotMappedAsPointer = 213, EccUncorrectable = 214, UnsupportedLimit = 215, DeviceAlreadyInUse = 216, PeerAccessUnsupported = 217, InvalidPtx = 218, InvalidGraphicsContext = 219, NvlinkUncorrectable = 220, JitCompilerNotFound = 221, UnsupportedPtxVersion = 222, JitCompilationDisabled = 223, UnsupportedExecAffinity = 224, UnsupportedDevSideSync = 225, InvalidSource = 300, FileNotFound = 301, SharedObjectSymbolNotFound = 302, SharedObjectInitFailed = 303, OperatingSystem = 304, InvalidResourceHandle = 400, IllegalState = 401, LostConnection = 402, SymbolNotFound = 500, NotReady = 600, IllegalAddress = 700, LaunchOutOfResources = 701, LaunchTimeout = 702, LaunchIncompatibleTexturing = 703, PeerAccessAlreadyEnabled = 704, PeerAccessNotEnabled = 705, SetOnActiveProcess = 708, ContextIsDestroyed = 709, Assert = 710, TooManyPeers = 711, HostMemoryAlreadyRegistered = 712, HostMemoryNotRegistered = 713, HardwareStackError = 714, IllegalInstruction = 715, MisalignedAddress = 716, InvalidAddressSpace = 717, InvalidPc = 718, LaunchFailure = 719, CooperativeLaunchTooLarge = 720, NotPermitted = 800, NotSupported = 801, SystemNotReady = 802, SystemDriverMismatch = 803, CompatNotSupportedOnDevice = 804, MpsConnectionFailed = 805, MpsRpcFailure = 806, MpsServerNotReady = 807, MpsMaxClientsReached = 808, MpsMaxConnectionsReached = 809, MpsClientTerminated = 810, CdpNotSupported = 811, CdpVersionMismatch = 812, StreamCaptureUnsupported = 900, StreamCaptureInvalidated = 901, StreamCaptureMerge = 902, StreamCaptureUnmatched = 903, StreamCaptureUnjoined = 904, StreamCaptureIsolation = 905, StreamCaptureImplicit = 906, CapturedEvent = 907, StreamCaptureWrongThread = 908, Timeout = 909, GraphExecUpdateFailure = 910, ExternalDevice = 911, InvalidClusterSize = 912, FunctionNotLoaded = 913, InvalidResourceType = 914, InvalidResourceConfiguration = 915, Unknown = 999, DriverNotAvailable = 1000, NoGpu = 1001, DeviceNotSet = 1002,
}
Expand description

CUDA Runtime API error.

Each variant corresponds to a distinct cudaError_t value from the CUDA Runtime specification. The integer discriminant matches the canonical cudaError_t value so that raw codes received through FFI can be converted cheaply via from_code.

Variants§

§

InvalidValue = 1

cudaErrorInvalidValue (1) — an invalid value was supplied.

§

MemoryAllocation = 2

cudaErrorMemoryAllocation (2) — device memory allocation failed.

§

InitializationError = 3

cudaErrorInitializationError (3) — CUDA initialization failed.

§

CudartUnloading = 4

cudaErrorCudartUnloading (4) — CUDA runtime is unloading.

§

ProfilerDisabled = 5

cudaErrorProfilerDisabled (5) — profiler was disabled.

§

InvalidConfiguration = 9

cudaErrorInvalidConfiguration (9) — invalid kernel launch configuration.

§

InvalidPitchValue = 12

cudaErrorInvalidPitchValue (12)

§

InvalidSymbol = 13

cudaErrorInvalidSymbol (13)

§

InvalidHostPointer = 16

cudaErrorInvalidHostPointer (16)

§

InvalidDevicePointer = 17

cudaErrorInvalidDevicePointer (17)

§

InvalidTexture = 18

cudaErrorInvalidTexture (18)

§

InvalidTextureBinding = 19

cudaErrorInvalidTextureBinding (19)

§

InvalidChannelDescriptor = 20

cudaErrorInvalidChannelDescriptor (20)

§

InvalidMemcpyDirection = 21

cudaErrorInvalidMemcpyDirection (21)

§

InvalidFilterSetting = 26

cudaErrorInvalidFilterSetting (26)

§

InvalidNormSetting = 27

cudaErrorInvalidNormSetting (27)

§

StubLibrary = 34

cudaErrorStubLibrary (34) — stub library loaded instead of real driver.

§

InsufficientDriver = 35

cudaErrorInsufficientDriver (35) — installed driver is too old.

§

CallRequiresNewerDriver = 36

cudaErrorCallRequiresNewerDriver (36)

§

InvalidSurface = 37

cudaErrorInvalidSurface (37)

§

DuplicateVariableName = 43

cudaErrorDuplicateVariableName (43)

§

DuplicateTextureName = 44

cudaErrorDuplicateTextureName (44)

§

DuplicateSurfaceName = 45

cudaErrorDuplicateSurfaceName (45)

§

DevicesUnavailable = 46

cudaErrorDevicesUnavailable (46)

§

IncompatibleDriverContext = 49

cudaErrorIncompatibleDriverContext (49)

§

MissingConfiguration = 52

cudaErrorMissingConfiguration (52)

§

LaunchMaxDepthExceeded = 65

cudaErrorLaunchMaxDepthExceeded (65)

§

LaunchFileScopedTex = 66

cudaErrorLaunchFileScopedTex (66)

§

LaunchFileScopedSurf = 67

cudaErrorLaunchFileScopedSurf (67)

§

SyncDepthExceeded = 68

cudaErrorSyncDepthExceeded (68)

§

LaunchPendingCountExceeded = 69

cudaErrorLaunchPendingCountExceeded (69)

§

InvalidDeviceFunction = 98

cudaErrorInvalidDeviceFunction (98)

§

NoDevice = 100

cudaErrorNoDevice (100) — no CUDA-capable device is detected.

§

InvalidDevice = 101

cudaErrorInvalidDevice (101) — the specified device is invalid.

§

DeviceNotLicensed = 102

cudaErrorDeviceNotLicensed (102)

§

SoftwareValidityNotEstablished = 103

cudaErrorSoftwareValidityNotEstablished (103)

§

StartupFailure = 127

cudaErrorStartupFailure (127)

§

InvalidKernelImage = 200

cudaErrorInvalidKernelImage (200)

§

DeviceUninitialized = 201

cudaErrorDeviceUninitialized (201)

§

MapBufferObjectFailed = 205

cudaErrorMapBufferObjectFailed (205)

§

UnmapBufferObjectFailed = 206

cudaErrorUnmapBufferObjectFailed (206)

§

ArrayIsMapped = 207

cudaErrorArrayIsMapped (207)

§

AlreadyMapped = 208

cudaErrorAlreadyMapped (208)

§

NoKernelImageForDevice = 209

cudaErrorNoKernelImageForDevice (209)

§

AlreadyAcquired = 210

cudaErrorAlreadyAcquired (210)

§

NotMapped = 211

cudaErrorNotMapped (211)

§

NotMappedAsArray = 212

cudaErrorNotMappedAsArray (212)

§

NotMappedAsPointer = 213

cudaErrorNotMappedAsPointer (213)

§

EccUncorrectable = 214

cudaErrorECCUncorrectable (214)

§

UnsupportedLimit = 215

cudaErrorUnsupportedLimit (215)

§

DeviceAlreadyInUse = 216

cudaErrorDeviceAlreadyInUse (216)

§

PeerAccessUnsupported = 217

cudaErrorPeerAccessUnsupported (217)

§

InvalidPtx = 218

cudaErrorInvalidPtx (218)

§

InvalidGraphicsContext = 219

cudaErrorInvalidGraphicsContext (219)

§

NvlinkUncorrectable = 220

cudaErrorNvlinkUncorrectable (220)

§

JitCompilerNotFound = 221

cudaErrorJitCompilerNotFound (221)

§

UnsupportedPtxVersion = 222

cudaErrorUnsupportedPtxVersion (222)

§

JitCompilationDisabled = 223

cudaErrorJitCompilationDisabled (223)

§

UnsupportedExecAffinity = 224

cudaErrorUnsupportedExecAffinity (224)

§

UnsupportedDevSideSync = 225

cudaErrorUnsupportedDevSideSync (225)

§

InvalidSource = 300

cudaErrorInvalidSource (300)

§

FileNotFound = 301

cudaErrorFileNotFound (301)

§

SharedObjectSymbolNotFound = 302

cudaErrorSharedObjectSymbolNotFound (302)

§

SharedObjectInitFailed = 303

cudaErrorSharedObjectInitFailed (303)

§

OperatingSystem = 304

cudaErrorOperatingSystem (304)

§

InvalidResourceHandle = 400

cudaErrorInvalidResourceHandle (400)

§

IllegalState = 401

cudaErrorIllegalState (401)

§

LostConnection = 402

cudaErrorLostConnection (402)

§

SymbolNotFound = 500

cudaErrorSymbolNotFound (500)

§

NotReady = 600

cudaErrorNotReady (600) — async operation not yet complete.

§

IllegalAddress = 700

cudaErrorIllegalAddress (700)

§

LaunchOutOfResources = 701

cudaErrorLaunchOutOfResources (701)

§

LaunchTimeout = 702

cudaErrorLaunchTimeout (702)

§

LaunchIncompatibleTexturing = 703

cudaErrorLaunchIncompatibleTexturing (703)

§

PeerAccessAlreadyEnabled = 704

cudaErrorPeerAccessAlreadyEnabled (704)

§

PeerAccessNotEnabled = 705

cudaErrorPeerAccessNotEnabled (705)

§

SetOnActiveProcess = 708

cudaErrorSetOnActiveProcess (708)

§

ContextIsDestroyed = 709

cudaErrorContextIsDestroyed (709)

§

Assert = 710

cudaErrorAssert (710) — device-side assertion triggered.

§

TooManyPeers = 711

cudaErrorTooManyPeers (711)

§

HostMemoryAlreadyRegistered = 712

cudaErrorHostMemoryAlreadyRegistered (712)

§

HostMemoryNotRegistered = 713

cudaErrorHostMemoryNotRegistered (713)

§

HardwareStackError = 714

cudaErrorHardwareStackError (714)

§

IllegalInstruction = 715

cudaErrorIllegalInstruction (715)

§

MisalignedAddress = 716

cudaErrorMisalignedAddress (716)

§

InvalidAddressSpace = 717

cudaErrorInvalidAddressSpace (717)

§

InvalidPc = 718

cudaErrorInvalidPc (718)

§

LaunchFailure = 719

cudaErrorLaunchFailure (719) — exception during kernel execution.

§

CooperativeLaunchTooLarge = 720

cudaErrorCooperativeLaunchTooLarge (720)

§

NotPermitted = 800

cudaErrorNotPermitted (800)

§

NotSupported = 801

cudaErrorNotSupported (801)

§

SystemNotReady = 802

cudaErrorSystemNotReady (802)

§

SystemDriverMismatch = 803

cudaErrorSystemDriverMismatch (803)

§

CompatNotSupportedOnDevice = 804

cudaErrorCompatNotSupportedOnDevice (804)

§

MpsConnectionFailed = 805

cudaErrorMpsConnectionFailed (805)

§

MpsRpcFailure = 806

cudaErrorMpsRpcFailure (806)

§

MpsServerNotReady = 807

cudaErrorMpsServerNotReady (807)

§

MpsMaxClientsReached = 808

cudaErrorMpsMaxClientsReached (808)

§

MpsMaxConnectionsReached = 809

cudaErrorMpsMaxConnectionsReached (809)

§

MpsClientTerminated = 810

cudaErrorMpsClientTerminated (810)

§

CdpNotSupported = 811

cudaErrorCdpNotSupported (811)

§

CdpVersionMismatch = 812

cudaErrorCdpVersionMismatch (812)

§

StreamCaptureUnsupported = 900

cudaErrorStreamCaptureUnsupported (900)

§

StreamCaptureInvalidated = 901

cudaErrorStreamCaptureInvalidated (901)

§

StreamCaptureMerge = 902

cudaErrorStreamCaptureMerge (902)

§

StreamCaptureUnmatched = 903

cudaErrorStreamCaptureUnmatched (903)

§

StreamCaptureUnjoined = 904

cudaErrorStreamCaptureUnjoined (904)

§

StreamCaptureIsolation = 905

cudaErrorStreamCaptureIsolation (905)

§

StreamCaptureImplicit = 906

cudaErrorStreamCaptureImplicit (906)

§

CapturedEvent = 907

cudaErrorCapturedEvent (907)

§

StreamCaptureWrongThread = 908

cudaErrorStreamCaptureWrongThread (908)

§

Timeout = 909

cudaErrorTimeout (909)

§

GraphExecUpdateFailure = 910

cudaErrorGraphExecUpdateFailure (910)

§

ExternalDevice = 911

cudaErrorExternalDevice (911)

§

InvalidClusterSize = 912

cudaErrorInvalidClusterSize (912)

§

FunctionNotLoaded = 913

cudaErrorFunctionNotLoaded (913)

§

InvalidResourceType = 914

cudaErrorInvalidResourceType (914)

§

InvalidResourceConfiguration = 915

cudaErrorInvalidResourceConfiguration (915)

§

Unknown = 999

cudaErrorUnknown (999) — unknown error.

§

DriverNotAvailable = 1000

Driver could not be loaded at runtime (libcuda.so not found).

§

NoGpu = 1001

No GPU available (driver loaded but 0 CUDA devices).

§

DeviceNotSet = 1002

Runtime context not initialised (call cudaSetDevice first).

Implementations§

Source§

impl CudaRtError

Source

pub fn from_code(code: u32) -> Option<Self>

Convert a raw cudaError_t integer to CudaRtError.

Returns Ok(()) for cudaSuccess (0) and maps all other values.

Source

pub fn is_transient(self) -> bool

Return true if the error is transient (e.g. NotReady).

Source

pub fn is_no_device(self) -> bool

Return true if the error indicates no CUDA hardware is present.

Trait Implementations§

Source§

impl Clone for CudaRtError

Source§

fn clone(&self) -> CudaRtError

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 CudaRtError

Source§

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

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

impl Display for CudaRtError

Source§

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

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

impl Error for CudaRtError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CudaError> for CudaRtError

Convert a CudaError (driver error) to CudaRtError.

Source§

fn from(e: CudaError) -> Self

Converts to this type from the input type.
Source§

impl Hash for CudaRtError

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 PartialEq for CudaRtError

Source§

fn eq(&self, other: &CudaRtError) -> 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 Eq for CudaRtError

Source§

impl StructuralPartialEq for CudaRtError

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more