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>>,
) -> TlBackendError
pub fn shape_mismatch( operation: impl Into<String>, expected: Vec<Vec<usize>>, actual: Vec<Vec<usize>>, ) -> TlBackendError
Create a shape mismatch error
Sourcepub fn invalid_einsum(spec: impl Into<String>) -> TlBackendError
pub fn invalid_einsum(spec: impl Into<String>) -> TlBackendError
Create an invalid einsum spec error
Sourcepub fn tensor_not_found(name: impl Into<String>) -> TlBackendError
pub fn tensor_not_found(name: impl Into<String>) -> TlBackendError
Create a tensor not found error
Sourcepub fn invalid_operation(msg: impl Into<String>) -> TlBackendError
pub fn invalid_operation(msg: impl Into<String>) -> TlBackendError
Create an invalid operation error
Sourcepub fn numerical(
kind: NumericalErrorKind,
location: impl Into<String>,
) -> TlBackendError
pub fn numerical( kind: NumericalErrorKind, location: impl Into<String>, ) -> TlBackendError
Create a numerical error
Create a GPU unavailable error
Sourcepub fn unsupported(msg: impl Into<String>) -> TlBackendError
pub fn unsupported(msg: impl Into<String>) -> TlBackendError
Create an unsupported feature error
Sourcepub fn execution(msg: impl Into<String>) -> TlBackendError
pub fn execution(msg: impl Into<String>) -> TlBackendError
Create an execution error
Sourcepub fn gradient(msg: impl Into<String>) -> TlBackendError
pub fn gradient(msg: impl Into<String>) -> TlBackendError
Create a gradient 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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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 UnsafeUnpin for TlBackendError
impl UnwindSafe for TlBackendError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.