pub enum SlotFault {
PlanHalvesDisagree {
dst_slots: usize,
src_rows: usize,
},
SlotOutOfRange {
slot: u32,
slots: usize,
},
SlotWrittenTwice {
slot: u32,
},
LayerOutOfRange {
layer: u32,
num_layers: usize,
},
RowMissing {
bank: usize,
layer: u32,
row: u32,
},
RowSizeMismatch {
bank: usize,
layer: u32,
row: u32,
expected: usize,
got: usize,
},
Residency(ResidencyError),
Device {
bank: usize,
slot: u32,
detail: String,
},
DeviceFlush {
slots: Vec<u32>,
detail: String,
},
}Expand description
Why a plan was refused, or how applying it failed.
Variants§
PlanHalvesDisagree
The two halves of a CopyPlan have different lengths, so
pair i is not a pair. Applying it anyway would write row i
into some other expert’s slot – silently wrong weights, the
worst outcome available here.
SlotOutOfRange
A plan named a slot the pool does not have. The planner and
this pool were built with different cache_size values.
SlotWrittenTwice
One plan writes the same slot twice. The second write wins and the first expert is simply absent from the slot the plan promised it in, while the cache records both as resident.
LayerOutOfRange
A plan named a layer the pool was not built for.
RowMissing
The host bank has no such row.
RowSizeMismatch
A host row is not exactly one slot wide – see the module docs on why a short row is worse than a missing one.
Residency(ResidencyError)
This layer’s host residency does not permit the copy the plan
describes; see crate::residency::CopyRoute.
Device
The device refused a copy. slot has been marked unknown here
and must be forgotten by the planner too.
DeviceFlush
The device failed to complete a plan’s deferred copies.
Distinct from Device because no single slot is
at fault: a backend that batches its copies cannot say which of
them landed, so every slot the plan wrote is suspect. They
are all marked unknown here and all named, so the planner can
be told to forget the same set – forgetting only the last one
would leave the rest reading back as resident.
Trait Implementations§
impl Eq for SlotFault
Source§impl Error for SlotFault
impl Error for SlotFault
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()
Source§impl From<ResidencyError> for SlotFault
impl From<ResidencyError> for SlotFault
Source§fn from(e: ResidencyError) -> Self
fn from(e: ResidencyError) -> Self
impl StructuralPartialEq for SlotFault
Auto Trait Implementations§
impl Freeze for SlotFault
impl RefUnwindSafe for SlotFault
impl Send for SlotFault
impl Sync for SlotFault
impl Unpin for SlotFault
impl UnsafeUnpin for SlotFault
impl UnwindSafe for SlotFault
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more