Skip to main content

Status

Enum Status 

Source
#[non_exhaustive]
pub enum Status {
Show 101 variants Success, InvalidValue, OutOfMemory, NotInitialized, Deinitialized, ProfilerDisabled, ProfilerNotInitialized, ProfilerAlreadyStarted, ProfilerAlreadyStopped, StubLibrary, CallRequiresNewerDriver, DeviceUnavailable, 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, UnsupportedExecAffinity, UnsupportedDevsideSync, Contained, InvalidSource, FileNotFound, SharedObjectInitFailed, OperatingSystem, InvalidHandle, IllegalState, LossyQuery, NotFound, NotReady, IllegalAddress, LaunchOutOfResources, LaunchTimeout, PeerAccessAlreadyEnabled, PeerAccessNotEnabled, PrimaryContextActive, ContextIsDestroyed, Assert, TooManyPeers, HostMemoryNotRegistered, HardwareStackError, IllegalInstruction, MisalignedAddress, InvalidAddressSpace, InvalidPc, LaunchFailed, CooperativeLaunchTooLarge, TensorMemoryLeak, NotPermitted, NotSupported, SystemNotReady, SystemDriverMismatch, MpsConnectionFailed, MpsRpcFailure, MpsServerNotReady, MpsMaxClientsReached, MpsMaxConnectionsReached, MpsClientTerminated, CdpNotSupported, CdpVersionMismatch, StreamCaptureUnsupported, StreamCaptureInvalidated, StreamCaptureMerge, StreamCaptureUnmatched, StreamCaptureUnjoined, StreamCaptureIsolation, StreamCaptureImplicit, CapturedEvent, StreamCaptureWrongThread, Timeout, GraphExecUpdateFailure, ExternalDevice, InvalidClusterSize, FunctionNotLoaded, InvalidResourceType, KeyRotation, StreamDetached, MulticastResourceFull, InsufficientLoaderVersion, FabricNotReady, UnknownError, Unknown(u32),
}
Expand description

CUDA driver and runtime status code.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Success

The API call returned with no errors.

For a query such as Event::query or Stream::query, it also means the queried work is complete.

§

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 or other resources to perform the requested operation.

§

NotInitialized

This indicates that the CUDA driver has not been initialized 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

Deprecated: This error return is deprecated as of CUDA 5.0. Starting or stopping the profiler without initialization is no longer an error.

§

ProfilerAlreadyStarted

👎Deprecated

Deprecated: This error return is deprecated as of CUDA 5.0. Starting the profiler when profiling is already enabled is no longer an error.

§

ProfilerAlreadyStopped

👎Deprecated

Deprecated: This error return is deprecated as of CUDA 5.0. Stopping the profiler when profiling is already disabled is no longer an error.

§

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.

§

CallRequiresNewerDriver

This indicates that the API call requires a newer CUDA driver than the one currently installed.

Users should install an updated NVIDIA CUDA driver to allow the API call to succeed.

§

DeviceUnavailable

This indicates that requested CUDA device is unavailable at the current time.

Devices are often unavailable because their compute mode is ComputeMode::ExclusiveProcess or ComputeMode::Prohibited.

§

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 or that the action requested is invalid for the specified 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 a context passed to an API call is not a valid handle, such as a destroyed context. This can also be returned if a context and an API call come from different driver API versions. This can also be returned if a green context passed to an API call was not converted to an ordinary context first.

§

ContextAlreadyCurrent

👎Deprecated

This indicated that the context being supplied as a parameter to the API call was already the active context.

§

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 context limit 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.

§

UnsupportedExecAffinity

This indicates that the execution affinity type passed to the API call is not supported by the active device.

§

UnsupportedDevsideSync

This indicates that the code to be compiled by the PTX JIT calls device-side cudaDeviceSynchronize, which is unsupported.

§

Contained

This indicates that an exception occurred on the device that is now contained by the GPU’s error containment capability.

Common causes are certain invalid accesses of peer GPU memory over NVLink and certain classes of hardware errors. 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.

§

InvalidSource

This indicates that the device kernel source is invalid.

This includes compilation/linker errors encountered in device code or user error.

§

FileNotFound

This indicates that the file specified was not found.

§

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 native handles such as those of streams and events.

§

IllegalState

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

§

LossyQuery

This indicates an attempt was made to introspect an object in a way that would discard semantically important information.

This is either due to the object using functionality newer than the API version used to introspect it or omission of optional return arguments.

§

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 an error, but differs from Status::Success, which indicates completion.

§

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, such as a 64-bit pointer where a 32-bit integer 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 the device enables timeouts, as DeviceAttribute::KernelExecTimeout reports. 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.

§

PeerAccessAlreadyEnabled

This error indicates an attempt to enable peer access to a context that already has it enabled.

§

PeerAccessNotEnabled

This error indicates an attempt to disable peer access that has not been enabled.

§

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, 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 involved.

§

HostMemoryNotRegistered

This error indicates that a host pointer being unregistered 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 a cooperative launch requested more blocks per grid than the kernel’s maximum active blocks per multiprocessor times DeviceAttribute::MultiprocessorCount.

§

TensorMemoryLeak

An exception occurred on the device while exiting a kernel using tensor memory: the tensor memory was not completely deallocated.

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.

§

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.

§

MpsConnectionFailed

This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server.

§

MpsRpcFailure

This error indicates that the remote procedural call between the MPS server and the MPS client failed.

§

MpsServerNotReady

This error indicates that the MPS server is not ready to accept new MPS client requests.

This error can be returned when the MPS server is in the process of recovering from a fatal failure.

§

MpsMaxClientsReached

This error indicates that the hardware resources required to create MPS client have been exhausted.

§

MpsMaxConnectionsReached

This error indicates the hardware resources required to support device connections have been exhausted.

§

MpsClientTerminated

This error indicates that the MPS client has been terminated by the server.

To continue using CUDA, the process must be terminated and relaunched.

§

CdpNotSupported

This error indicates that the module is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it.

§

CdpVersionMismatch

This error indicates that a module contains an unsupported interaction between different versions of CUDA Dynamic Parallelism.

§

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 the legacy default stream.

§

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 that did not begin in StreamCaptureMode::Relaxed was ended from 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.

§

ExternalDevice

This indicates that an error has occurred in a device outside of GPU.

It can be a synchronous error with respect to CUDA API or an asynchronous error from the external device. In case of asynchronous error, it means that if CUDA was waiting for an external device’s signal before consuming shared data, the external device signaled an error indicating that the data is not valid for consumption. 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. In case of synchronous error, it means that one or more external devices have encountered an error and cannot complete the operation.

§

InvalidClusterSize

Indicates a kernel launch error due to cluster misconfiguration.

§

FunctionNotLoaded

Indicates a function handle is not loaded when calling an API that requires a loaded function.

§

InvalidResourceType

This error indicates one or more resources passed in are not valid resource types for the operation.

§

KeyRotation

This error indicates that an error happened during the key rotation sequence.

§

StreamDetached

This error indicates that the requested operation is not permitted because the stream is in a detached state.

This can occur if the green context associated with the stream has been destroyed, limiting the stream’s operational capabilities.

§

MulticastResourceFull

The API call failed because of a hardware resource required to bind memory to a multicast object is unavailable.

§

InsufficientLoaderVersion

This indicates that the Loader version is insufficient for fatbin.

§

FabricNotReady

The GPU fabric is not ready within the bounded wait while the fabric manager probe is still in progress (or not converging in time).

Applications may retry after a delay; environment variables such as CUDA_FABRIC_INIT_TIMEOUT_MS set the initialization wait budget.

§

UnknownError

This indicates that an unknown internal error has occurred.

§

Unknown(u32)

A status code not known to this wrapper.

Implementations§

Source§

impl Status

Source

pub const fn raw(self) -> u32

Returns the raw library status code.

Source§

impl Status

Source

pub fn description(self) -> &'static str

Returns the library’s description of this status.

Trait Implementations§

Source§

impl Clone for Status

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Status

Source§

impl Debug for Status

Source§

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

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

impl Display for Status

Source§

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

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

impl Eq for Status

Source§

impl From<Status> for Error

Source§

fn from(code: Status) -> Self

Converts to this type from the input type.
Source§

impl From<cudaError_enum> for Status

Source§

fn from(status: cudaError_t) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Status

Source§

fn from(code: u32) -> Self

Converts to this type from the input type.
Source§

impl Hash for Status

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 Status

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Status

Source§

impl TryFrom<Status> for cudaError_t

Source§

type Error = Status

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

fn try_from(status: Status) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Forget for Status

§

impl Freeze for Status

§

impl Move for Status

§

impl RefUnwindSafe for Status

§

impl Send for Status

§

impl Sync for Status

§

impl Unpin for Status

§

impl UnsafeUnpin for Status

§

impl UnwindSafe for Status

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.