#[repr(u32)]pub enum ErrorCode {
Show 80 variants
Success = 0,
InvalidValue = 1,
OutOfMemory = 2,
NotInitialized = 3,
Deinitialized = 4,
ProfilerDisabled = 5,
ProfilerNotInitialized = 6,
ProfilerAlreadyStarted = 7,
ProfilerAlreadyStopped = 8,
StubLibrary = 34,
NoDevice = 100,
InvalidDevice = 101,
DeviceNotLicensed = 102,
InvalidImage = 200,
InvalidContext = 201,
ContextAlreadyCurrent = 202,
MapFailed = 205,
UnmapFailed = 206,
ArrayIsMapped = 207,
AlreadyMapped = 208,
NoBinaryForGpu = 209,
AlreadyAcquired = 210,
NotMapped = 211,
NotMappedAsArray = 212,
NotMappedAsPointer = 213,
EccUncorrectable = 214,
UnsupportedLimit = 215,
ContextAlreadyInUse = 216,
PeerAccessUnsupported = 217,
InvalidPtx = 218,
InvalidGraphicsContext = 219,
NvlinkUncorrectable = 220,
JitCompilerNotFound = 221,
UnsupportedPtxVersion = 222,
JitCompilationDisabled = 223,
InvalidSource = 300,
FileNotFound = 301,
SharedObjectSymbolNotFound = 302,
SharedObjectInitFailed = 303,
OperatingSystem = 304,
InvalidHandle = 400,
IllegalState = 401,
NotFound = 500,
NotReady = 600,
IllegalAddress = 700,
LaunchOutOfResources = 701,
LaunchTimeout = 702,
LaunchIncompatibleTexturing = 703,
PeerAccessAlreadyEnabled = 704,
PeerAccessNotEnabled = 705,
PrimaryContextActive = 708,
ContextIsDestroyed = 709,
Assert = 710,
TooManyPeers = 711,
HostMemoryAlreadyRegistered = 712,
HostMemoryNotRegistered = 713,
HardwareStackError = 714,
IllegalInstruction = 715,
MisalignedAddress = 716,
InvalidAddressSpace = 717,
InvalidPc = 718,
LaunchFailed = 719,
CooperativeLaunchTooLarge = 720,
NotPermitted = 800,
NotSupported = 801,
SystemNotReady = 802,
SystemDriverMismatch = 803,
CompatNotSupportedOnDevice = 804,
StreamCaptureUnsupported = 900,
StreamCaptureInvalidated = 901,
StreamCaptureMerge = 902,
StreamCaptureUnmatched = 903,
StreamCaptureUnjoined = 904,
StreamCaptureIsolation = 905,
StreamCaptureImplicit = 906,
CapturedEvent = 907,
StreamCaptureWrongThread = 908,
Timeout = 909,
GraphExecUpdateFailure = 910,
Unknown = 999,
}
Expand description
A device-sourced or libcuda
-sourced error code
Variants§
Success = 0
The API call returned with no errors. In the case of query calls, this also means that the operation being queried is complete (see ::cuEventQuery() and ::cuStreamQuery()).
InvalidValue = 1
This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.
OutOfMemory = 2
The API call failed because it was unable to allocate enough memory to perform the requested operation.
NotInitialized = 3
This indicates that the CUDA driver has not been initialized with ::cuInit() or that initialization has failed.
Deinitialized = 4
This indicates that the CUDA driver is in the process of shutting down.
ProfilerDisabled = 5
This indicates profiler is not initialized for this run. This can happen when the application is running with external profiling tools like visual profiler.
ProfilerNotInitialized = 6
\deprecated This error return is deprecated as of CUDA 5.0. It is no longer an error to attempt to enable/disable the profiling via ::cuProfilerStart or ::cuProfilerStop without initialization.
ProfilerAlreadyStarted = 7
\deprecated This error return is deprecated as of CUDA 5.0. It is no longer an error to call cuProfilerStart() when profiling is already enabled.
ProfilerAlreadyStopped = 8
\deprecated This error return is deprecated as of CUDA 5.0. It is no longer an error to call cuProfilerStop() when profiling is already disabled.
StubLibrary = 34
This indicates that the CUDA driver that the application has loaded is a stub library. Applications that run with the stub rather than a real driver loaded will result in CUDA API returning this error.
NoDevice = 100
This indicates that no CUDA-capable devices were detected by the installed CUDA driver.
InvalidDevice = 101
This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device.
DeviceNotLicensed = 102
This error indicates that the Grid license is not applied.
InvalidImage = 200
This indicates that the device kernel image is invalid. This can also indicate an invalid CUDA module.
InvalidContext = 201
This most frequently indicates that there is no context bound to the current thread. This can also be returned if the context passed to an API call is not a valid handle (such as a context that has had ::cuCtxDestroy() invoked on it). This can also be returned if a user mixes different API versions (i.e. 3010 context with 3020 API calls). See ::cuCtxGetApiVersion() for more details.
ContextAlreadyCurrent = 202
This indicated that the context being supplied as a parameter to the API call was already the active context. \deprecated This error return is deprecated as of CUDA 3.2. It is no longer an error to attempt to push the active context via ::cuCtxPushCurrent().
MapFailed = 205
This indicates that a map or register operation has failed.
UnmapFailed = 206
This indicates that an unmap or unregister operation has failed.
ArrayIsMapped = 207
This indicates that the specified array is currently mapped and thus cannot be destroyed.
AlreadyMapped = 208
This indicates that the resource is already mapped.
NoBinaryForGpu = 209
This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration.
AlreadyAcquired = 210
This indicates that a resource has already been acquired.
NotMapped = 211
This indicates that a resource is not mapped.
NotMappedAsArray = 212
This indicates that a mapped resource is not available for access as an array.
NotMappedAsPointer = 213
This indicates that a mapped resource is not available for access as a pointer.
EccUncorrectable = 214
This indicates that an uncorrectable ECC error was detected during execution.
UnsupportedLimit = 215
This indicates that the ::CUlimit passed to the API call is not supported by the active device.
ContextAlreadyInUse = 216
This indicates that the ::CUcontext passed to the API call can only be bound to a single CPU thread at a time but is already bound to a CPU thread.
PeerAccessUnsupported = 217
This indicates that peer access is not supported across the given devices.
InvalidPtx = 218
This indicates that a PTX JIT compilation failed.
InvalidGraphicsContext = 219
This indicates an error with OpenGL or DirectX context.
NvlinkUncorrectable = 220
This indicates that an uncorrectable NVLink error was detected during the execution.
JitCompilerNotFound = 221
This indicates that the PTX JIT compiler library was not found.
UnsupportedPtxVersion = 222
This indicates that the provided PTX was compiled with an unsupported toolchain.
JitCompilationDisabled = 223
This indicates that the PTX JIT compilation was disabled.
InvalidSource = 300
This indicates that the device kernel source is invalid.
FileNotFound = 301
This indicates that the file specified was not found.
This indicates that a link to a shared object failed to resolve.
This indicates that initialization of a shared object failed.
OperatingSystem = 304
This indicates that an OS call failed.
InvalidHandle = 400
This indicates that a resource handle passed to the API call was not valid. Resource handles are opaque types like ::CUstream and ::CUevent.
IllegalState = 401
This indicates that a resource required by the API call is not in a valid state to perform the requested operation.
NotFound = 500
This indicates that a named symbol was not found. Examples of symbols are global/constant variable names, driver function names, texture names, and surface names.
NotReady = 600
This indicates that asynchronous operations issued previously have not completed yet. This result is not actually an error, but must be indicated differently than ::CUDA_SUCCESS (which indicates completion). Calls that may return this value include ::cuEventQuery() and ::cuStreamQuery().
IllegalAddress = 700
While executing a kernel, the device encountered a load or store instruction on an invalid memory address. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
LaunchOutOfResources = 701
This indicates that a launch did not occur because it did not have appropriate resources. This error usually indicates that the user has attempted to pass too many arguments to the device kernel, or the kernel launch specifies too many threads for the kernel’s register count. Passing arguments of the wrong size (i.e. a 64-bit pointer when a 32-bit int is expected) is equivalent to passing too many arguments and can also result in this error.
LaunchTimeout = 702
This indicates that the device kernel took too long to execute. This can only occur if timeouts are enabled - see the device attribute ::CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT for more information. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
LaunchIncompatibleTexturing = 703
This error indicates a kernel launch that uses an incompatible texturing mode.
PeerAccessAlreadyEnabled = 704
This error indicates that a call to ::cuCtxEnablePeerAccess() is trying to re-enable peer access to a context which has already had peer access to it enabled.
PeerAccessNotEnabled = 705
This error indicates that ::cuCtxDisablePeerAccess() is trying to disable peer access which has not been enabled yet via ::cuCtxEnablePeerAccess().
PrimaryContextActive = 708
This error indicates that the primary context for the specified device has already been initialized.
ContextIsDestroyed = 709
This error indicates that the context current to the calling thread has been destroyed using ::cuCtxDestroy, or is a primary context which has not yet been initialized.
Assert = 710
A device-side assert triggered during kernel execution. The context cannot be used anymore, and must be destroyed. All existing device memory allocations from this context are invalid and must be reconstructed if the program is to continue using CUDA.
TooManyPeers = 711
This error indicates that the hardware resources required to enable peer access have been exhausted for one or more of the devices passed to ::cuCtxEnablePeerAccess().
HostMemoryAlreadyRegistered = 712
This error indicates that the memory range passed to ::cuMemHostRegister() has already been registered.
HostMemoryNotRegistered = 713
This error indicates that the pointer passed to ::cuMemHostUnregister() does not correspond to any currently registered memory region.
HardwareStackError = 714
While executing a kernel, the device encountered a stack error. This can be due to stack corruption or exceeding the stack size limit. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
IllegalInstruction = 715
While executing a kernel, the device encountered an illegal instruction. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
MisalignedAddress = 716
While executing a kernel, the device encountered a load or store instruction on a memory address which is not aligned. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
InvalidAddressSpace = 717
While executing a kernel, the device encountered an instruction which can only operate on memory locations in certain address spaces (global, shared, or local), but was supplied a memory address not belonging to an allowed address space. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
InvalidPc = 718
While executing a kernel, the device program counter wrapped its address space. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
LaunchFailed = 719
An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. Less common cases can be system specific - more information about these cases can be found in the system specific user guide. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
CooperativeLaunchTooLarge = 720
This error indicates that the number of blocks launched per grid for a kernel that was launched via either ::cuLaunchCooperativeKernel or ::cuLaunchCooperativeKernelMultiDevice exceeds the maximum number of blocks as allowed by ::cuOccupancyMaxActiveBlocksPerMultiprocessor or ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors as specified by the device attribute ::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT.
NotPermitted = 800
This error indicates that the attempted operation is not permitted.
NotSupported = 801
This error indicates that the attempted operation is not supported on the current system or device.
SystemNotReady = 802
This error indicates that the system is not yet ready to start any CUDA work. To continue using CUDA, verify the system configuration is in a valid state and all required driver daemons are actively running. More information about this error can be found in the system specific user guide.
SystemDriverMismatch = 803
This error indicates that there is a mismatch between the versions of the display driver and the CUDA driver. Refer to the compatibility documentation for supported versions.
CompatNotSupportedOnDevice = 804
This error indicates that the system was upgraded to run with forward compatibility but the visible hardware detected by CUDA does not support this configuration. Refer to the compatibility documentation for the supported hardware matrix or ensure that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES environment variable.
StreamCaptureUnsupported = 900
This error indicates that the operation is not permitted when the stream is capturing.
StreamCaptureInvalidated = 901
This error indicates that the current capture sequence on the stream has been invalidated due to a previous error.
StreamCaptureMerge = 902
This error indicates that the operation would have resulted in a merge of two independent capture sequences.
StreamCaptureUnmatched = 903
This error indicates that the capture was not initiated in this stream.
StreamCaptureUnjoined = 904
This error indicates that the capture sequence contains a fork that was not joined to the primary stream.
StreamCaptureIsolation = 905
This error indicates that a dependency would have been created which crosses the capture sequence boundary. Only implicit in-stream ordering dependencies are allowed to cross the boundary.
StreamCaptureImplicit = 906
This error indicates a disallowed implicit dependency on a current capture sequence from cudaStreamLegacy.
CapturedEvent = 907
This error indicates that the operation is not permitted on an event which was last recorded in a capturing stream.
StreamCaptureWrongThread = 908
A stream capture sequence not initiated with the ::CU_STREAM_CAPTURE_MODE_RELAXED argument to ::cuStreamBeginCapture was passed to ::cuStreamEndCapture in a different thread.
Timeout = 909
This error indicates that the timeout specified for the wait operation has lapsed.
GraphExecUpdateFailure = 910
This error indicates that the graph update was not performed because it included changes which violated constraints specific to instantiated graph update.
Unknown = 999
This indicates that an unknown internal error has occurred.