pub enum GroupedGemmError {
DimensionOverflow {
job: usize,
dimension: &'static str,
},
SpanOverflow {
job: usize,
buffer: &'static str,
},
BufferOutOfBounds {
job: usize,
buffer: &'static str,
offset: usize,
required_end: usize,
available: usize,
},
OverlappingOutputs {
first: usize,
second: usize,
},
IncompatibleSharedLhs {
first: usize,
second: usize,
},
IncompatibleSharedRhs {
first: usize,
second: usize,
},
WorkingMemoryExceeded {
required: usize,
limit: usize,
},
Backend {
source: Error,
},
}Expand description
Validation or backend error from a shared-buffer grouped GEMM.
Validation is completed before the configured backend session is entered, so these errors leave the caller’s output unchanged.
§Examples
use tensor4all_tensorbackend::{
grouped_mat_mul_shared, GroupedGemmError, GroupedGemmJob, GroupedGemmOptions,
};
let error = grouped_mat_mul_shared(
&[1.0_f64],
&[1.0_f64],
&mut [0.0_f64],
&[GroupedGemmJob::new(1, 0, 0, 1, 1, 1)],
GroupedGemmOptions::default(),
)
.unwrap_err();
assert!(matches!(error, GroupedGemmError::BufferOutOfBounds { .. }));Variants§
DimensionOverflow
A matrix dimension product overflowed usize.
SpanOverflow
An offset plus the required span overflowed usize.
BufferOutOfBounds
A job’s input or output span exceeds its caller-owned buffer.
Fields
OverlappingOutputs
Two output spans overlap without a reduction contract.
Jobs sharing one left-input offset disagree on its matrix shape.
Jobs sharing one right-input offset disagree on its matrix shape.
WorkingMemoryExceeded
The descriptor translation exceeds the caller’s working-memory limit.
Fields
Backend
The configured provider or tensor view rejected an otherwise validated request.
Trait Implementations§
Source§impl Debug for GroupedGemmError
impl Debug for GroupedGemmError
Source§impl Display for GroupedGemmError
impl Display for GroupedGemmError
Source§impl Error for GroupedGemmError
impl Error for GroupedGemmError
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()
Auto Trait Implementations§
impl Freeze for GroupedGemmError
impl RefUnwindSafe for GroupedGemmError
impl Send for GroupedGemmError
impl Sync for GroupedGemmError
impl Unpin for GroupedGemmError
impl UnsafeUnpin for GroupedGemmError
impl UnwindSafe for GroupedGemmError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more