pub enum Error {
Show 56 variants
UnexpectedDType {
msg: &'static str,
expected: DType,
got: DType,
},
DTypeMismatchBinaryOp {
lhs: DType,
rhs: DType,
op: &'static str,
},
UnsupportedDTypeForOp(DType, &'static str),
NoZeroScalar(DType),
NoOneScalar(DType),
ScalarUnrepresentable(DType, f64),
PackedElementHasNoScalar(DType),
DimOutOfRange {
shape: Box<Shape>,
dim: i32,
op: &'static str,
},
DuplicateDimIndex {
shape: Box<Shape>,
dims: Vec<usize>,
op: &'static str,
},
UnexpectedNumberOfDims {
expected: usize,
got: usize,
shape: Box<Shape>,
},
UnexpectedShape {
msg: String,
expected: Box<Shape>,
got: Box<Shape>,
},
ShapeMismatch {
buffer_size: usize,
shape: Box<Shape>,
},
ShapeMismatchBinaryOp {
lhs: Box<Shape>,
rhs: Box<Shape>,
op: &'static str,
},
ShapeMismatchCat {
dim: usize,
first_shape: Box<Shape>,
n: usize,
nth_shape: Box<Shape>,
},
ShapeMismatchSplit {
shape: Box<Shape>,
dim: usize,
n_parts: usize,
},
OnlySingleDimension {
op: &'static str,
dims: Vec<usize>,
},
EmptyTensor {
op: &'static str,
},
DeviceMismatchBinaryOp {
lhs: DeviceLocation,
rhs: DeviceLocation,
op: &'static str,
},
NarrowInvalidArgs {
shape: Box<Shape>,
dim: usize,
start: usize,
len: usize,
msg: &'static str,
},
Conv1dInvalidArgs {
inp_shape: Box<Shape>,
k_shape: Box<Shape>,
padding: usize,
stride: usize,
msg: &'static str,
},
InvalidIndex {
op: &'static str,
index: usize,
size: usize,
},
BroadcastIncompatibleShapes {
src_shape: Box<Shape>,
dst_shape: Box<Shape>,
},
CannotSetVar {
msg: &'static str,
},
MatMulUnexpectedStriding(Box<MatMulUnexpectedStriding>),
RequiresContiguous {
op: &'static str,
},
OpRequiresAtLeastOneTensor {
op: &'static str,
},
OpRequiresAtLeastTwoTensors {
op: &'static str,
},
BackwardNotSupported {
op: &'static str,
},
NoBackendForOp {
op: OpKind,
dtypes: Vec<DType>,
available_backends: Vec<BackendId>,
supported_combinations: Vec<(BackendId, OpKind, Vec<DType>)>,
},
UnsupportedTransfer {
from: DeviceLocation,
to: DeviceLocation,
available_paths: Vec<TransferPath>,
},
AlignmentMismatch {
backend: BackendId,
required: usize,
actual: usize,
},
TopologyChanged {
plan_generation: u64,
current_generation: u64,
},
NotCompiledWithCudaSupport,
NotCompiledWithMetalSupport,
NotCompiledWithVulkanSupport,
CannotFindTensor {
path: String,
},
Cuda(Box<dyn Error + Send + Sync>),
Metal(Box<dyn Error + Send + Sync>),
Vulkan(Box<dyn Error + Send + Sync>),
TryFromIntError(TryFromIntError),
Npy(String),
Zip(ZipError),
ParseInt(ParseIntError),
FromUtf8(FromUtf8Error),
Io(Error),
SafeTensor(SafeTensorError),
UnsupportedSafeTensorDtype(Dtype),
Wrapped(Box<dyn Display + Send + Sync>),
WrappedContext {
wrapped: Box<dyn Error + Send + Sync>,
context: String,
},
Context {
inner: Box<Error>,
context: Box<dyn Display + Send + Sync>,
},
WithPath {
inner: Box<Error>,
path: PathBuf,
},
WithBacktrace {
inner: Box<Error>,
backtrace: Box<Backtrace>,
},
Msg(String),
UnwrapNone,
FilterRejected {
filter: &'static str,
ctx_summary: String,
available_alternatives: usize,
},
InvalidBranch {
reason: String,
},
}Expand description
The main error type for the fuel library.
Variants§
UnexpectedDType
DTypeMismatchBinaryOp
UnsupportedDTypeForOp(DType, &'static str)
NoZeroScalar(DType)
NoOneScalar(DType)
ScalarUnrepresentable(DType, f64)
PackedElementHasNoScalar(DType)
DimOutOfRange
DuplicateDimIndex
UnexpectedNumberOfDims
UnexpectedShape
ShapeMismatch
ShapeMismatchBinaryOp
ShapeMismatchCat
ShapeMismatchSplit
OnlySingleDimension
EmptyTensor
DeviceMismatchBinaryOp
NarrowInvalidArgs
Conv1dInvalidArgs
InvalidIndex
BroadcastIncompatibleShapes
CannotSetVar
MatMulUnexpectedStriding(Box<MatMulUnexpectedStriding>)
RequiresContiguous
OpRequiresAtLeastOneTensor
OpRequiresAtLeastTwoTensors
BackwardNotSupported
NoBackendForOp
No registered backend supports (op, dtypes) for the given
input residency. Fires at DAG construction (planning time),
not at execution.
dtypes is the per-operand dtype list (inputs in order, then
outputs) used as the binding-table lookup key. For uniform-
precision ops the list contains a single repeated dtype; for
mixed-precision ops (e.g. Cast: src→dst) the list distinguishes
the operands.
Fields
UnsupportedTransfer
No transfer path connects from and to directly, and
host-staging fallback isn’t available either (e.g. neither
device can copy_to_host). Fires at DAG construction.
AlignmentMismatch
Source storage’s alignment doesn’t meet the destination backend’s required alignment, and Router has no way to repack on this path. Fires at DAG construction.
TopologyChanged
The ExecutionPlan consumed by the executor was built against
an older SystemTopology generation than the one observable
at dispatch time — backends were added, removed, or had their
capabilities re-probed since the plan was committed. Caught
at dispatch-chunk boundaries by Phase 4.3 of the picker-work
arc; the realize layer catches this and rebuilds the plan
against the fresh topology.
plan_generation is the counter the plan was stamped with at
compile_plan time. current_generation is the value
fuel_dispatch::dispatch::topology_generation() observed when
the executor crossed the chunk boundary.
NotCompiledWithCudaSupport
NotCompiledWithMetalSupport
NotCompiledWithVulkanSupport
CannotFindTensor
Cuda(Box<dyn Error + Send + Sync>)
Metal(Box<dyn Error + Send + Sync>)
Vulkan(Box<dyn Error + Send + Sync>)
TryFromIntError(TryFromIntError)
Npy(String)
Zip(ZipError)
Zip file format error.
ParseInt(ParseIntError)
Integer parse error.
FromUtf8(FromUtf8Error)
Utf8 parse error.
Io(Error)
I/O error.
SafeTensor(SafeTensorError)
SafeTensor error.
UnsupportedSafeTensorDtype(Dtype)
Wrapped(Box<dyn Display + Send + Sync>)
Arbitrary errors wrapping.
WrappedContext
Arbitrary errors wrapping with context.
Context
WithPath
Adding path information to an error.
WithBacktrace
Msg(String)
User generated error message, typically created via bail!.
UnwrapNone
FilterRejected
A hard filter in the optimizer ranker’s filter chain rejected every candidate at this decision point. Phase 1.1 of the picker-work arc. The user asked for something the binding-table can’t deliver — typically a precision floor or tolerance budget no registered kernel meets — and the ranker surfaces it rather than silently substituting a non-admissible alternative.
Soft filters (caps preferences, empirical refinements) never
raise this error; only filters classified FilterClass::Hard
fail loudly when they would leave the candidate set empty.
Fields
InvalidBranch
Build-time rejection from the Op::Branch builders
(Graph::open_branch / BranchBuilder::add_arm /
BranchBuilder::finalize_branches). Phase A PR-A1 of the
“plan IS the graph” rebuild. The multi-path structure is an
arena fact validated at graph-build time — never a realize-time
panic — so an ill-formed branch (a reconverge_at that is not a
descendant of the diverge point, arms that are not internally
disjoint, arm exits that disagree on shape/dtype at reconverge)
surfaces here with a human-readable reason rather than corrupting
the arena.
Implementations§
Source§impl Error
impl Error
Sourcepub fn wrap(err: impl Display + Send + Sync + 'static) -> Error
pub fn wrap(err: impl Display + Send + Sync + 'static) -> Error
Wraps an arbitrary displayable error.
Sourcepub fn debug(err: impl Debug) -> Error
pub fn debug(err: impl Debug) -> Error
Creates an error message from the debug representation of a value.
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()
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Error
fn from(source: FromUtf8Error) -> Error
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(source: ParseIntError) -> Error
fn from(source: ParseIntError) -> Error
Source§impl From<SafeTensorError> for Error
impl From<SafeTensorError> for Error
Source§fn from(source: SafeTensorError) -> Error
fn from(source: SafeTensorError) -> Error
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(source: TryFromIntError) -> Error
fn from(source: TryFromIntError) -> Error
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more