#[non_exhaustive]pub enum Error {
Show 41 variants
Load(LoadError),
UnsupportedArchitecture {
target: String,
},
NoCompatibleArtifact {
name: Cow<'static, str>,
major: u32,
minor: u32,
},
Artifact(ArtifactError),
ThreadLocalStreamUnsupported,
ForeignStreamMismatch,
Operation(Box<dyn Error + Send + Sync>),
Completion(Arc<Self>),
CompletionWorkerStopped,
ResourceDestructionPanicked,
CompletionPanicked,
ManagedHostAccessUnsupported,
ReentrantAccess,
LockPoisoned {
name: Cow<'static, str>,
},
LaunchContract(LaunchContractError),
Compiler {
message: String,
},
NvJitLink {
code: Status,
diagnostic: String,
},
Cuda {
code: Status,
},
Nvrtc {
code: Status,
},
Nvvm {
code: Status,
},
InteriorNul,
Io(Error),
DeviceNotFound,
UnsupportedPinnedAlignment {
align: usize,
},
OwnershipShared {
name: Cow<'static, str>,
},
MemoryContextMismatch,
NullHandle,
NullPointer {
name: Cow<'static, str>,
},
NotPositive {
name: Cow<'static, str>,
},
Empty {
name: Cow<'static, str>,
},
UnknownEnumValue {
name: Cow<'static, str>,
value: i64,
},
OutOfRange {
name: Cow<'static, str>,
},
LengthMismatch {
name: Cow<'static, str>,
expected: usize,
actual: usize,
},
BufferTooSmall {
name: Cow<'static, str>,
required: usize,
actual: usize,
},
SizeMismatch {
name: Cow<'static, str>,
expected: usize,
actual: usize,
},
Misaligned {
name: Cow<'static, str>,
alignment: usize,
},
GraphDependencyMismatch,
GraphNodeMismatch,
ContextMismatch {
name: Cow<'static, str>,
},
StreamContextMismatch,
CheckpointDirectionMismatch {
operation: &'static str,
},
}Expand description
CUDA wrapper failures, including native status codes, compiler diagnostics, resource ownership, and submission tracking.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Load(LoadError)
A library or symbol would not load.
UnsupportedArchitecture
The requested GPU architecture cannot be represented or supported by this operation.
NoCompatibleArtifact
No embedded artifact with the requested name matches the target compute capability.
Fields
Artifact(ArtifactError)
Embedded artifact selection, decoding, or loading failed.
Tuple Fields
0: ArtifactErrorUnderlying artifact error.
ThreadLocalStreamUnsupported
A per-thread default stream cannot be retained as a stream shared across threads.
ForeignStreamMismatch
The foreign readiness stream and Singe stream refer to different native CUDA streams.
Operation(Box<dyn Error + Send + Sync>)
The submitted native operation returned an error.
Completion(Arc<Self>)
An error was retained while waiting for submission completion.
CompletionWorkerStopped
The worker responsible for tracking CUDA completion stopped.
ResourceDestructionPanicked
Destroying a retained submission resource panicked.
CompletionPanicked
Retiring completed submission state panicked.
ManagedHostAccessUnsupported
The device cannot provide the concurrent managed access required for managed host access.
ReentrantAccess
CUDA access was requested while the calling thread already held a host or enqueue access guard.
LockPoisoned
A lock was poisoned by an earlier panic.
LaunchContract(LaunchContractError)
Kernel argument, launch, or memory-access validation failed.
Tuple Fields
0: LaunchContractErrorKernel launch contract violation.
Compiler
A compiler operation failed with a diagnostic message.
NvJitLink
nvJitLink returned a failure status, with the linker’s error log.
Fields
Cuda
A CUDA driver or runtime call returned a failure status.
Nvrtc
An NVRTC call returned a failure status.
Nvvm
An NVVM call returned a failure status.
InteriorNul
A string intended for a native NUL-terminated interface contains an interior NUL byte.
Io(Error)
An operating-system I/O operation failed.
DeviceNotFound
The requested CUDA device could not be found.
UnsupportedPinnedAlignment
A pinned host allocation needs an alignment above 4096 bytes, or CUDA returned a chunk that is not page-aligned.
An owner cannot be consumed or released while other owners share it.
MemoryContextMismatch
The memory allocation belongs to another CUDA context.
NullHandle
A native call returned a null handle where a live resource was required.
NullPointer
A pointer argument or native result is null where a valid address is required.
NotPositive
A value must be greater than zero.
Empty
A value or collection is empty where content is required.
UnknownEnumValue
A native enum value has no typed variant in this crate.
OutOfRange
A named argument or computed extent exceeds the supported range.
LengthMismatch
Two lengths that must be equal differ.
Fields
BufferTooSmall
A buffer cannot hold what the operation reads from or writes to it.
Fields
SizeMismatch
Two byte sizes that must be equal differ.
Fields
Misaligned
An address, offset, or size is not a multiple of the required alignment.
Fields
GraphDependencyMismatch
Graph dependency relationships do not match the required graph state.
GraphNodeMismatch
A graph node belongs to a different graph.
ContextMismatch
A CUDA object other than memory or a stream belongs to a different CUDA context.
StreamContextMismatch
The stream belongs to a different CUDA context.
CheckpointDirectionMismatch
A checkpoint region was copied against its operation’s direction: to the host during a restore, or from the host during a checkpoint.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()