pub enum KernelError {
Show 44 variants
Tensor(TensorError),
InvalidMatMulRank {
left_rank: usize,
right_rank: usize,
},
MatMulShapeMismatch {
left: Vec<usize>,
right: Vec<usize>,
},
ThreadPoolBuild {
message: String,
},
InvalidPoolRank {
got_rank: usize,
},
InvalidPoolParameters {
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
},
PoolKernelLargerThanInput {
input_h: usize,
input_w: usize,
kernel_h: usize,
kernel_w: usize,
},
InvalidConvRank {
input_rank: usize,
kernel_rank: usize,
},
InvalidConvParameters {
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
},
ConvChannelMismatch {
input_channels: usize,
kernel_in_channels: usize,
},
ConvKernelLargerThanInput {
input_h: usize,
input_w: usize,
kernel_h: usize,
kernel_w: usize,
},
ConvBiasShapeMismatch {
bias_shape: Vec<usize>,
out_channels: usize,
},
InvalidDepthwiseConvRank {
input_rank: usize,
kernel_rank: usize,
},
InvalidDepthwiseConvParameters {
kernel_h: usize,
kernel_w: usize,
stride_h: usize,
stride_w: usize,
},
DepthwiseConvChannelMismatch {
input_channels: usize,
kernel_channels: usize,
},
DepthwiseConvKernelLargerThanInput {
input_h: usize,
input_w: usize,
kernel_h: usize,
kernel_w: usize,
},
DepthwiseConvBiasShapeMismatch {
bias_shape: Vec<usize>,
out_channels: usize,
},
InvalidSeparablePointwiseKernelShape {
pointwise_shape: Vec<usize>,
},
InvalidBatchNormRank {
got_rank: usize,
},
BatchNormParameterShapeMismatch {
parameter: &'static str,
shape: Vec<usize>,
expected_channels: usize,
},
InvalidBatchNormEpsilon,
InvalidBatchNormVariance {
channel: usize,
},
InvalidSoftmaxRank {
got_rank: usize,
},
InvalidLogSoftmaxRank {
got_rank: usize,
},
InvalidLogSumExpRank {
got_rank: usize,
},
InvalidLayerNormRank {
got_rank: usize,
},
LayerNormParameterShapeMismatch {
parameter: &'static str,
shape: Vec<usize>,
expected_features: usize,
},
InvalidLayerNormEpsilon,
InvalidAttentionRank {
query_rank: usize,
key_rank: usize,
value_rank: usize,
},
AttentionDkMismatch {
query_dk: usize,
key_dk: usize,
},
AttentionSeqKMismatch {
key_seq: usize,
value_seq: usize,
},
AttentionMaskShapeMismatch {
expected: Vec<usize>,
got: Vec<usize>,
},
InvalidGroupNormRank {
got_rank: usize,
},
GroupNormChannelGroupMismatch {
channels: usize,
num_groups: usize,
},
GroupNormParameterShapeMismatch {
parameter: &'static str,
shape: Vec<usize>,
expected_channels: usize,
},
InvalidGroupNormEpsilon,
InvalidGroupNormNumGroups,
InvalidRmsNormRank {
got_rank: usize,
},
RmsNormParameterShapeMismatch {
parameter: &'static str,
shape: Vec<usize>,
expected_features: usize,
},
InvalidRmsNormEpsilon,
InvalidEmbeddingWeightRank {
got_rank: usize,
},
EmbeddingIndexOutOfBounds {
index: usize,
vocab_size: usize,
},
DeformableConvOffsetShapeMismatch {
expected: Vec<usize>,
got: Vec<usize>,
},
Gpu {
message: String,
},
}Expand description
Errors returned by kernel backends.
Variants§
Tensor(TensorError)
InvalidMatMulRank
MatMulShapeMismatch
ThreadPoolBuild
InvalidPoolRank
InvalidPoolParameters
PoolKernelLargerThanInput
InvalidConvRank
InvalidConvParameters
ConvChannelMismatch
ConvKernelLargerThanInput
ConvBiasShapeMismatch
InvalidDepthwiseConvRank
InvalidDepthwiseConvParameters
DepthwiseConvChannelMismatch
DepthwiseConvKernelLargerThanInput
DepthwiseConvBiasShapeMismatch
InvalidSeparablePointwiseKernelShape
InvalidBatchNormRank
BatchNormParameterShapeMismatch
InvalidBatchNormEpsilon
InvalidBatchNormVariance
InvalidSoftmaxRank
InvalidLogSoftmaxRank
InvalidLogSumExpRank
InvalidLayerNormRank
LayerNormParameterShapeMismatch
InvalidLayerNormEpsilon
InvalidAttentionRank
AttentionDkMismatch
AttentionSeqKMismatch
AttentionMaskShapeMismatch
InvalidGroupNormRank
GroupNormChannelGroupMismatch
GroupNormParameterShapeMismatch
InvalidGroupNormEpsilon
InvalidGroupNormNumGroups
InvalidRmsNormRank
RmsNormParameterShapeMismatch
InvalidRmsNormEpsilon
InvalidEmbeddingWeightRank
EmbeddingIndexOutOfBounds
DeformableConvOffsetShapeMismatch
Gpu
Trait Implementations§
Source§impl Clone for KernelError
impl Clone for KernelError
Source§fn clone(&self) -> KernelError
fn clone(&self) -> KernelError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KernelError
impl Debug for KernelError
Source§impl Display for KernelError
impl Display for KernelError
Source§impl Error for KernelError
impl Error for KernelError
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<TensorError> for KernelError
impl From<TensorError> for KernelError
Source§fn from(source: TensorError) -> Self
fn from(source: TensorError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for KernelError
impl PartialEq for KernelError
impl Eq for KernelError
impl StructuralPartialEq for KernelError
Auto Trait Implementations§
impl Freeze for KernelError
impl RefUnwindSafe for KernelError
impl Send for KernelError
impl Sync for KernelError
impl Unpin for KernelError
impl UnsafeUnpin for KernelError
impl UnwindSafe for KernelError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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