pub enum InputSignatureError {
ShapeStrideRankMismatch {
rank: usize,
stride_count: usize,
},
InvalidAlignmentClass {
alignment_log2: u8,
},
TensorMetadata {
input: usize,
source: Error,
},
}Expand description
Reports failures while building value-free input signatures.
§Examples
use tenferro_runtime::{DType, InputSignatureEntry, LayoutClass};
use tenferro_tensor::Placement;
let error = InputSignatureEntry::new(
DType::F64,
[2_usize].into_iter().collect(),
Placement::default(),
LayoutClass::new("tenferro.layout.strided").unwrap(),
[1_isize, 2].into_iter().collect(),
None,
)
.unwrap_err();
assert!(matches!(error, tenferro_runtime::InputSignatureError::ShapeStrideRankMismatch { .. }));Variants§
ShapeStrideRankMismatch
Shape rank and stride rank disagree.
InvalidAlignmentClass
The alignment class is outside the finite usize alignment lattice.
TensorMetadata
Tensor metadata could not be read for an input.
Trait Implementations§
Source§impl Debug for InputSignatureError
impl Debug for InputSignatureError
Source§impl Display for InputSignatureError
impl Display for InputSignatureError
Source§impl Error for InputSignatureError
impl Error for InputSignatureError
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 InputSignatureError
impl !RefUnwindSafe for InputSignatureError
impl Send for InputSignatureError
impl Sync for InputSignatureError
impl Unpin for InputSignatureError
impl UnsafeUnpin for InputSignatureError
impl !UnwindSafe for InputSignatureError
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> 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