Enum cuda_oxide::error::ErrorCode[][src]

#[repr(u32)]
pub enum ErrorCode {
Show variants Success, InvalidValue, OutOfMemory, NotInitialized, Deinitialized, ProfilerDisabled, ProfilerNotInitialized, ProfilerAlreadyStarted, ProfilerAlreadyStopped, StubLibrary, NoDevice, InvalidDevice, DeviceNotLicensed, InvalidImage, InvalidContext, ContextAlreadyCurrent, MapFailed, UnmapFailed, ArrayIsMapped, AlreadyMapped, NoBinaryForGpu, AlreadyAcquired, NotMapped, NotMappedAsArray, NotMappedAsPointer, EccUncorrectable, UnsupportedLimit, ContextAlreadyInUse, PeerAccessUnsupported, InvalidPtx, InvalidGraphicsContext, NvlinkUncorrectable, JitCompilerNotFound, UnsupportedPtxVersion, JitCompilationDisabled, InvalidSource, FileNotFound, SharedObjectSymbolNotFound, SharedObjectInitFailed, OperatingSystem, InvalidHandle, IllegalState, NotFound, NotReady, IllegalAddress, LaunchOutOfResources, LaunchTimeout, LaunchIncompatibleTexturing, PeerAccessAlreadyEnabled, PeerAccessNotEnabled, PrimaryContextActive, ContextIsDestroyed, Assert, TooManyPeers, HostMemoryAlreadyRegistered, HostMemoryNotRegistered, HardwareStackError, IllegalInstruction, MisalignedAddress, InvalidAddressSpace, InvalidPc, LaunchFailed, CooperativeLaunchTooLarge, NotPermitted, NotSupported, SystemNotReady, SystemDriverMismatch, CompatNotSupportedOnDevice, StreamCaptureUnsupported, StreamCaptureInvalidated, StreamCaptureMerge, StreamCaptureUnmatched, StreamCaptureUnjoined, StreamCaptureIsolation, StreamCaptureImplicit, CapturedEvent, StreamCaptureWrongThread, Timeout, GraphExecUpdateFailure, Unknown,
}
Expand description

A device-sourced or libcuda-sourced error code

Variants

Success

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

This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.

OutOfMemory

The API call failed because it was unable to allocate enough memory to perform the requested operation.

NotInitialized

This indicates that the CUDA driver has not been initialized with ::cuInit() or that initialization has failed.

Deinitialized

This indicates that the CUDA driver is in the process of shutting down.

ProfilerDisabled

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

\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

\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

\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

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

This indicates that no CUDA-capable devices were detected by the installed CUDA driver.

InvalidDevice

This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device.

DeviceNotLicensed

This error indicates that the Grid license is not applied.

InvalidImage

This indicates that the device kernel image is invalid. This can also indicate an invalid CUDA module.

InvalidContext

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

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

This indicates that a map or register operation has failed.

UnmapFailed

This indicates that an unmap or unregister operation has failed.

ArrayIsMapped

This indicates that the specified array is currently mapped and thus cannot be destroyed.

AlreadyMapped

This indicates that the resource is already mapped.

NoBinaryForGpu

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

This indicates that a resource has already been acquired.

NotMapped

This indicates that a resource is not mapped.

NotMappedAsArray

This indicates that a mapped resource is not available for access as an array.

NotMappedAsPointer

This indicates that a mapped resource is not available for access as a pointer.

EccUncorrectable

This indicates that an uncorrectable ECC error was detected during execution.

UnsupportedLimit

This indicates that the ::CUlimit passed to the API call is not supported by the active device.

ContextAlreadyInUse

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

This indicates that peer access is not supported across the given devices.

InvalidPtx

This indicates that a PTX JIT compilation failed.

InvalidGraphicsContext

This indicates an error with OpenGL or DirectX context.

NvlinkUncorrectable

This indicates that an uncorrectable NVLink error was detected during the execution.

JitCompilerNotFound

This indicates that the PTX JIT compiler library was not found.

UnsupportedPtxVersion

This indicates that the provided PTX was compiled with an unsupported toolchain.

JitCompilationDisabled

This indicates that the PTX JIT compilation was disabled.

InvalidSource

This indicates that the device kernel source is invalid.

FileNotFound

This indicates that the file specified was not found.

SharedObjectSymbolNotFound

This indicates that a link to a shared object failed to resolve.

SharedObjectInitFailed

This indicates that initialization of a shared object failed.

OperatingSystem

This indicates that an OS call failed.

InvalidHandle

This indicates that a resource handle passed to the API call was not valid. Resource handles are opaque types like ::CUstream and ::CUevent.

IllegalState

This indicates that a resource required by the API call is not in a valid state to perform the requested operation.

NotFound

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

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

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

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

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

This error indicates a kernel launch that uses an incompatible texturing mode.

PeerAccessAlreadyEnabled

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

This error indicates that ::cuCtxDisablePeerAccess() is trying to disable peer access which has not been enabled yet via ::cuCtxEnablePeerAccess().

PrimaryContextActive

This error indicates that the primary context for the specified device has already been initialized.

ContextIsDestroyed

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

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

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

This error indicates that the memory range passed to ::cuMemHostRegister() has already been registered.

HostMemoryNotRegistered

This error indicates that the pointer passed to ::cuMemHostUnregister() does not correspond to any currently registered memory region.

HardwareStackError

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

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

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

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

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

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

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

This error indicates that the attempted operation is not permitted.

NotSupported

This error indicates that the attempted operation is not supported on the current system or device.

SystemNotReady

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

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

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

This error indicates that the operation is not permitted when the stream is capturing.

StreamCaptureInvalidated

This error indicates that the current capture sequence on the stream has been invalidated due to a previous error.

StreamCaptureMerge

This error indicates that the operation would have resulted in a merge of two independent capture sequences.

StreamCaptureUnmatched

This error indicates that the capture was not initiated in this stream.

StreamCaptureUnjoined

This error indicates that the capture sequence contains a fork that was not joined to the primary stream.

StreamCaptureIsolation

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

This error indicates a disallowed implicit dependency on a current capture sequence from cudaStreamLegacy.

CapturedEvent

This error indicates that the operation is not permitted on an event which was last recorded in a capturing stream.

StreamCaptureWrongThread

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

This error indicates that the timeout specified for the wait operation has lapsed.

GraphExecUpdateFailure

This error indicates that the graph update was not performed because it included changes which violated constraints specific to instantiated graph update.

Unknown

This indicates that an unknown internal error has occurred.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.