pub enum Error {
Show 45 variants
UOp {
source: Error,
},
ShapeUnknown,
SymbolicShapeUnsupported {
operation: String,
},
AxisOutOfRange {
axis: isize,
ndim: usize,
},
PermutationLengthMismatch {
expected: usize,
got: usize,
},
InvalidPermutation {
axes: Vec<isize>,
},
MultipleInferDimensions,
NegativeDimension {
dim: isize,
},
ReshapeSizeMismatch {
operation: String,
},
ExpandDimensionMismatch {
current_dims: usize,
target_dims: usize,
},
SqueezeDimensionNotOne {
dim: usize,
size: usize,
},
NdimExact {
op: &'static str,
expected: usize,
actual: usize,
},
NdimMinimum {
op: &'static str,
min: usize,
actual: usize,
},
Divisibility {
op: &'static str,
lhs_name: &'static str,
lhs: usize,
rhs_name: &'static str,
rhs: usize,
},
ParamRange {
op: &'static str,
param: &'static str,
value: String,
constraint: &'static str,
},
ConflictingReductionOptions,
DotDimensionError {
lhs_dims: usize,
rhs_dims: usize,
},
DotShapeMismatch {
lhs_shape: Box<Shape>,
rhs_shape: Box<Shape>,
},
BroadcastFewerDimensions {
from_dims: usize,
to_dims: usize,
},
BroadcastIncompatible {
dim: usize,
from_size: usize,
to_size: usize,
},
RenderKernel {
source: Error,
},
CompileKernel {
source: Error,
},
Rangeify {
source: Error,
},
Optimize {
source: OptError,
},
NoKernelsFound,
DependencyCycles,
EmptySchedule,
BatchOutputMismatch {
expected: usize,
actual: usize,
},
ExpectedCallableOp,
Execution {
source: Error,
},
CreateProgram {
source: Error,
},
DeviceFactory {
source: Error,
},
BufferNotFound {
uop_id: u64,
},
Device {
source: Error,
},
ExpectedPtrDtype {
context: &'static str,
actual: DType,
},
BufferPtrNoSize,
NoBuffer,
NoShape,
ShapeMismatch {
context: String,
expected: String,
actual: String,
},
IrConstruction {
details: String,
},
TypeMismatch {
expected: DType,
actual: DType,
},
FloatDTypeRequired {
op: &'static str,
arg: &'static str,
dtype: DType,
},
NdarrayShape {
source: ShapeError,
},
VariableOutOfRange {
name: String,
val: i64,
min: i64,
max: i64,
},
SymbolicShape,
}Variants§
UOp
ShapeUnknown
SymbolicShapeUnsupported
AxisOutOfRange
PermutationLengthMismatch
InvalidPermutation
MultipleInferDimensions
NegativeDimension
ReshapeSizeMismatch
ExpandDimensionMismatch
SqueezeDimensionNotOne
NdimExact
NdimMinimum
Divisibility
ParamRange
ConflictingReductionOptions
DotDimensionError
DotShapeMismatch
BroadcastFewerDimensions
BroadcastIncompatible
RenderKernel
CompileKernel
Rangeify
Optimize
NoKernelsFound
DependencyCycles
EmptySchedule
BatchOutputMismatch
ExpectedCallableOp
Execution
CreateProgram
DeviceFactory
BufferNotFound
Device
ExpectedPtrDtype
BufferPtrNoSize
NoBuffer
NoShape
ShapeMismatch
IrConstruction
TypeMismatch
FloatDTypeRequired
NdarrayShape
Fields
§
source: ShapeErrorVariableOutOfRange
SymbolicShape
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for Error
impl ErrorCompat for Error
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl<__T0, __T1> IntoError<Error> for AxisOutOfRangeSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for AxisOutOfRangeSnafu<__T0, __T1>
Source§impl<__T0, __T1> IntoError<Error> for BatchOutputMismatchSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for BatchOutputMismatchSnafu<__T0, __T1>
Source§impl<__T0, __T1> IntoError<Error> for BroadcastFewerDimensionsSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for BroadcastFewerDimensionsSnafu<__T0, __T1>
Source§impl<__T0, __T1, __T2> IntoError<Error> for BroadcastIncompatibleSnafu<__T0, __T1, __T2>
impl<__T0, __T1, __T2> IntoError<Error> for BroadcastIncompatibleSnafu<__T0, __T1, __T2>
Source§impl<__T0> IntoError<Error> for BufferNotFoundSnafu<__T0>
impl<__T0> IntoError<Error> for BufferNotFoundSnafu<__T0>
Source§impl IntoError<Error> for BufferPtrNoSizeSnafu
impl IntoError<Error> for BufferPtrNoSizeSnafu
Source§impl IntoError<Error> for CompileKernelSnafu
impl IntoError<Error> for CompileKernelSnafu
Source§impl IntoError<Error> for CreateProgramSnafu
impl IntoError<Error> for CreateProgramSnafu
Source§impl IntoError<Error> for DependencyCyclesSnafu
impl IntoError<Error> for DependencyCyclesSnafu
Source§impl IntoError<Error> for DeviceFactorySnafu
impl IntoError<Error> for DeviceFactorySnafu
Source§impl IntoError<Error> for DeviceSnafu
impl IntoError<Error> for DeviceSnafu
Source§impl<__T0, __T1, __T2, __T3, __T4> IntoError<Error> for DivisibilitySnafu<__T0, __T1, __T2, __T3, __T4>
impl<__T0, __T1, __T2, __T3, __T4> IntoError<Error> for DivisibilitySnafu<__T0, __T1, __T2, __T3, __T4>
Source§impl<__T0, __T1> IntoError<Error> for DotDimensionSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for DotDimensionSnafu<__T0, __T1>
Source§impl<__T0, __T1> IntoError<Error> for DotShapeMismatchSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for DotShapeMismatchSnafu<__T0, __T1>
Source§impl IntoError<Error> for EmptyScheduleSnafu
impl IntoError<Error> for EmptyScheduleSnafu
Source§impl IntoError<Error> for ExecutionSnafu
impl IntoError<Error> for ExecutionSnafu
Source§impl<__T0, __T1> IntoError<Error> for ExpandDimensionMismatchSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for ExpandDimensionMismatchSnafu<__T0, __T1>
Source§impl IntoError<Error> for ExpectedCallableOpSnafu
impl IntoError<Error> for ExpectedCallableOpSnafu
Source§impl<__T0, __T1> IntoError<Error> for ExpectedPtrDtypeSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for ExpectedPtrDtypeSnafu<__T0, __T1>
Source§impl<__T0, __T1, __T2> IntoError<Error> for FloatDTypeRequiredSnafu<__T0, __T1, __T2>
impl<__T0, __T1, __T2> IntoError<Error> for FloatDTypeRequiredSnafu<__T0, __T1, __T2>
Source§impl<__T0> IntoError<Error> for InvalidPermutationSnafu<__T0>
impl<__T0> IntoError<Error> for InvalidPermutationSnafu<__T0>
Source§impl<__T0> IntoError<Error> for IrConstructionSnafu<__T0>
impl<__T0> IntoError<Error> for IrConstructionSnafu<__T0>
Source§impl IntoError<Error> for NdarrayShapeSnafu
impl IntoError<Error> for NdarrayShapeSnafu
Source§type Source = ShapeError
type Source = ShapeError
The underlying error
Source§fn into_error(self, error: Self::Source) -> Error
fn into_error(self, error: Self::Source) -> Error
Combine the information to produce the error
Source§impl<__T0, __T1, __T2> IntoError<Error> for NdimExactSnafu<__T0, __T1, __T2>
impl<__T0, __T1, __T2> IntoError<Error> for NdimExactSnafu<__T0, __T1, __T2>
Source§impl<__T0, __T1, __T2> IntoError<Error> for NdimMinimumSnafu<__T0, __T1, __T2>
impl<__T0, __T1, __T2> IntoError<Error> for NdimMinimumSnafu<__T0, __T1, __T2>
Source§impl<__T0> IntoError<Error> for NegativeDimensionSnafu<__T0>
impl<__T0> IntoError<Error> for NegativeDimensionSnafu<__T0>
Source§impl IntoError<Error> for NoBufferSnafu
impl IntoError<Error> for NoBufferSnafu
Source§impl IntoError<Error> for NoKernelsFoundSnafu
impl IntoError<Error> for NoKernelsFoundSnafu
Source§impl IntoError<Error> for NoShapeSnafu
impl IntoError<Error> for NoShapeSnafu
Source§impl IntoError<Error> for OptimizeSnafu
impl IntoError<Error> for OptimizeSnafu
Source§impl<__T0, __T1, __T2, __T3> IntoError<Error> for ParamRangeSnafu<__T0, __T1, __T2, __T3>
impl<__T0, __T1, __T2, __T3> IntoError<Error> for ParamRangeSnafu<__T0, __T1, __T2, __T3>
Source§impl<__T0, __T1> IntoError<Error> for PermutationLengthMismatchSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for PermutationLengthMismatchSnafu<__T0, __T1>
Source§impl IntoError<Error> for RangeifySnafu
impl IntoError<Error> for RangeifySnafu
Source§impl IntoError<Error> for RenderKernelSnafu
impl IntoError<Error> for RenderKernelSnafu
Source§impl<__T0> IntoError<Error> for ReshapeSizeMismatchSnafu<__T0>
impl<__T0> IntoError<Error> for ReshapeSizeMismatchSnafu<__T0>
Source§impl<__T0, __T1, __T2> IntoError<Error> for ShapeMismatchSnafu<__T0, __T1, __T2>
impl<__T0, __T1, __T2> IntoError<Error> for ShapeMismatchSnafu<__T0, __T1, __T2>
Source§impl IntoError<Error> for ShapeUnknownSnafu
impl IntoError<Error> for ShapeUnknownSnafu
Source§impl<__T0, __T1> IntoError<Error> for SqueezeDimensionNotOneSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for SqueezeDimensionNotOneSnafu<__T0, __T1>
Source§impl IntoError<Error> for SymbolicShapeSnafu
impl IntoError<Error> for SymbolicShapeSnafu
Source§impl<__T0> IntoError<Error> for SymbolicShapeUnsupportedSnafu<__T0>
impl<__T0> IntoError<Error> for SymbolicShapeUnsupportedSnafu<__T0>
Source§impl<__T0, __T1> IntoError<Error> for TypeMismatchSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for TypeMismatchSnafu<__T0, __T1>
Source§impl<__T0, __T1, __T2, __T3> IntoError<Error> for VariableOutOfRangeSnafu<__T0, __T1, __T2, __T3>
impl<__T0, __T1, __T2, __T3> IntoError<Error> for VariableOutOfRangeSnafu<__T0, __T1, __T2, __T3>
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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