pub enum Error {
Show 15 variants
InvalidSubscripts(String),
ContractionError(String),
MissingInput(String),
NonScalarGrad {
shape: Vec<usize>,
},
TensorRuntime(Error),
UnexpectedBinding {
binding_index: usize,
},
UnboundPlaceholder {
input_key: String,
},
DuplicateBinding {
input_key: String,
},
PlaceholderDtypeMismatch {
expected: DType,
actual: DType,
},
PlaceholderShapeMismatch {
expected: Vec<usize>,
actual: Vec<usize>,
},
PlaceholderRankMismatch {
expected: usize,
actual: usize,
},
ContextMismatch {
lhs: ContextId,
rhs: ContextId,
},
InvalidGraphBuild {
op: &'static str,
message: String,
},
InvalidCompiledGraph {
message: String,
},
Internal(String),
}Expand description
Errors produced by einsum, eval, and other tenferro operations.
§Examples
use tenferro_runtime::error::Error;
let err = Error::InvalidSubscripts("rank mismatch".into());Variants§
InvalidSubscripts(String)
Einsum subscript string is invalid or cannot be parsed.
ContractionError(String)
Contraction optimization failed (shape mismatch, bad path, etc.).
MissingInput(String)
A required input tensor is missing from the inputs map.
NonScalarGrad
Reverse-mode gradient requires a scalar output.
TensorRuntime(Error)
Runtime tensor execution failed in the backend layer.
UnexpectedBinding
A TracedTensor passed to graph-executor input bindings is not a
placeholder (has attached data).
UnboundPlaceholder
A placeholder appearing in the graph has no binding supplied.
DuplicateBinding
The same placeholder was bound more than once in the bindings slice.
PlaceholderDtypeMismatch
A binding tensor’s dtype does not match the placeholder’s dtype.
PlaceholderShapeMismatch
A binding tensor’s shape does not match an input_concrete_shape
placeholder’s fixed shape.
PlaceholderRankMismatch
A binding tensor’s rank does not match an input_symbolic_shape
placeholder’s declared rank.
ContextMismatch
Operation attempted to mix tensors from different eager contexts.
InvalidGraphBuild
Traced graph construction rejected an invalid operation configuration.
InvalidCompiledGraph
Lowering rejected an inconsistent compiled graph.
Internal(String)
An unexpected internal error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()