pub enum TlBackendError {
ShapeMismatch(ShapeMismatchError),
InvalidEinsumSpec(String),
TensorNotFound(String),
InvalidOperation(String),
DeviceError(DeviceError),
OutOfMemory(String),
NumericalError(NumericalError),
GradientError(String),
GraphError(String),
ExecutionError(String),
Unsupported(String),
Internal(String),
}Expand description
Main error type for SciRS2 backend operations
Variants§
ShapeMismatch(ShapeMismatchError)
Shape mismatch between tensors or operations
InvalidEinsumSpec(String)
Invalid einsum specification
TensorNotFound(String)
Tensor not found in storage
InvalidOperation(String)
Invalid operation or operation parameters
DeviceError(DeviceError)
Device-related errors (GPU unavailable, memory, etc.)
OutOfMemory(String)
Out of memory errors
NumericalError(NumericalError)
Numerical stability issues (NaN, Inf, overflow)
GradientError(String)
Gradient computation errors
GraphError(String)
Graph structure errors (cycles, missing nodes, etc.)
ExecutionError(String)
Execution errors (runtime failures)
Unsupported(String)
Unsupported feature or operation
Internal(String)
Internal errors (should not happen)
Implementations§
Source§impl TlBackendError
Helper functions for creating common errors
impl TlBackendError
Helper functions for creating common errors
Sourcepub fn shape_mismatch(
operation: impl Into<String>,
expected: Vec<Vec<usize>>,
actual: Vec<Vec<usize>>,
) -> Self
pub fn shape_mismatch( operation: impl Into<String>, expected: Vec<Vec<usize>>, actual: Vec<Vec<usize>>, ) -> Self
Create a shape mismatch error
Sourcepub fn invalid_einsum(spec: impl Into<String>) -> Self
pub fn invalid_einsum(spec: impl Into<String>) -> Self
Create an invalid einsum spec error
Sourcepub fn tensor_not_found(name: impl Into<String>) -> Self
pub fn tensor_not_found(name: impl Into<String>) -> Self
Create a tensor not found error
Sourcepub fn invalid_operation(msg: impl Into<String>) -> Self
pub fn invalid_operation(msg: impl Into<String>) -> Self
Create an invalid operation error
Sourcepub fn numerical(kind: NumericalErrorKind, location: impl Into<String>) -> Self
pub fn numerical(kind: NumericalErrorKind, location: impl Into<String>) -> Self
Create a numerical error
Create a GPU unavailable error
Sourcepub fn unsupported(msg: impl Into<String>) -> Self
pub fn unsupported(msg: impl Into<String>) -> Self
Create an unsupported feature error
Trait Implementations§
Source§impl Debug for TlBackendError
impl Debug for TlBackendError
Source§impl Display for TlBackendError
impl Display for TlBackendError
Source§impl Error for TlBackendError
impl Error for TlBackendError
1.30.0 · 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 TlBackendError
impl RefUnwindSafe for TlBackendError
impl Send for TlBackendError
impl Sync for TlBackendError
impl Unpin for TlBackendError
impl UnwindSafe for TlBackendError
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