#[non_exhaustive]pub enum Error {
Show 28 variants
Cuda(Error),
Nccl(Error),
Cutensor {
code: Status,
message: String,
},
InteriorNul,
NullHandle,
HandleShared,
InvalidVersion {
name: &'static str,
},
OutOfRange {
name: String,
},
LengthMismatch {
name: String,
expected: usize,
actual: usize,
},
TensorModeMismatch {
rank: u32,
mode_length: usize,
},
TensorStrideMismatch {
rank: u32,
stride_length: usize,
},
DescriptorMismatch {
name: String,
},
ModeMismatch {
name: String,
},
TensorMemoryDataTypeMismatch {
descriptor: DataType,
memory: DataType,
},
ScalarDataTypeMismatch {
descriptor: DataType,
memory: DataType,
},
UnsupportedScalarDataType {
name: String,
data_type: DataType,
},
PointerCountMismatch {
name: String,
expected: usize,
actual: usize,
},
InsufficientWorkspaceSize {
required: u64,
actual: u64,
},
WorkspaceMisaligned {
required_alignment: u32,
size: usize,
},
StreamContextMismatch,
ContextMismatch {
name: String,
},
PlanOperationMismatch {
expected: String,
actual: String,
},
MgContextMismatch {
name: String,
},
MgHostTensorMemoryUnsupported {
name: String,
},
MpContextMismatch {
name: String,
},
PlanInvalidAttributeSize {
attr: PlanAttribute,
expected: usize,
actual: usize,
},
OperationDescriptorInvalidAttributeSize {
attr: OperationDescriptorAttribute,
expected: usize,
actual: usize,
},
PlanPreferenceInvalidAttributeSize {
attr: PlanPreferenceAttribute,
expected: usize,
actual: usize,
},
}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.
Cuda(Error)
Nccl(Error)
Cutensor
InteriorNul
NullHandle
InvalidVersion
OutOfRange
LengthMismatch
TensorModeMismatch
TensorStrideMismatch
DescriptorMismatch
ModeMismatch
TensorMemoryDataTypeMismatch
ScalarDataTypeMismatch
UnsupportedScalarDataType
PointerCountMismatch
InsufficientWorkspaceSize
WorkspaceMisaligned
StreamContextMismatch
ContextMismatch
PlanOperationMismatch
MgContextMismatch
MgHostTensorMemoryUnsupported
MpContextMismatch
PlanInvalidAttributeSize
OperationDescriptorInvalidAttributeSize
PlanPreferenceInvalidAttributeSize
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<cutensorStatus_t> for Error
impl From<cutensorStatus_t> for Error
Source§fn from(status: cutensorStatus_t) -> Self
fn from(status: cutensorStatus_t) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more