#[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)
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)
cudaErrorSharedObjectSymbolNotFound (302)
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
impl CudaRtError
Sourcepub fn from_code(code: u32) -> Option<Self>
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.
Sourcepub fn is_transient(self) -> bool
pub fn is_transient(self) -> bool
Return true if the error is transient (e.g. NotReady).
Sourcepub fn is_no_device(self) -> bool
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
impl Clone for CudaRtError
Source§fn clone(&self) -> CudaRtError
fn clone(&self) -> CudaRtError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CudaRtError
impl Debug for CudaRtError
Source§impl Display for CudaRtError
impl Display for CudaRtError
Source§impl Error for CudaRtError
impl Error for CudaRtError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CudaError> for CudaRtError
Convert a CudaError (driver error) to CudaRtError.
impl From<CudaError> for CudaRtError
Convert a CudaError (driver error) to CudaRtError.