pub enum ServerError {
Validation {
message: String,
backtrace: BackTrace,
},
Generic {
reason: String,
backtrace: BackTrace,
},
NoDeviceTransport {
operation: Collective,
backtrace: BackTrace,
},
ForeignHandle {
handle: String,
client: String,
backtrace: BackTrace,
},
ServiceMismatch {
client: String,
requested: String,
backtrace: BackTrace,
},
Launch(LaunchError),
Io(IoError),
TornDown,
Unwritten {
failure: u64,
claimed: u32,
chain: Vec<String>,
root: Box<ServerError>,
backtrace: BackTrace,
},
Skipped,
Several {
errors: Vec<Self>,
backtrace: BackTrace,
},
}Expand description
Error that can happen asynchronously while executing registered kernels.
Variants§
Validation
A runtime validation error
Fields
Generic
A generic runtime error.
Fields
NoDeviceTransport
The runtime has no transport between its devices, so the collective was
not run. Its own variant rather than a Generic reason, so a caller can
tell a runtime that cannot do this apart from a collective that failed.
Fields
operation: CollectiveThe collective that was asked for.
ForeignHandle
A handle from one service was handed to a client of another: memory coordinates mean nothing there, so nothing was run.
Fields
ServiceMismatch
A caller named a server type the client does not reach. The client is erased over its server, so the type it is asked for is checked against the one it was built from, and nothing was run.
Fields
Launch(LaunchError)
A launch error happened
Io(IoError)
An IO error happened
TornDown
The work writing this buffer was torn down before it could say what went wrong: its write scope never reached the exit that names the real failure, which a panic mid-launch explains.
This is the provisional error every write scope enters with, so it
carries no payload and captures no backtrace — a launch that succeeds
mints one and drops it again, and paying a String and a stack walk
per launch for the message nobody normally reads is the whole reason
it is a variant rather than a Generic.
Unwritten
The bytes asked about were never written: the work that was going to
write them failed, or was skipped downstream of a failure. chain
walks from the buffer asked about back toward the root, newest skip
first, and root is the failure that started it.
Fields
failure: u64The failure’s id in the device’s error store, as printed by every other read that trips over the same failure.
root: Box<ServerError>The failure that started it, backtrace included.
Skipped
The work did not run, because an input it needed carried a failure.
The report is on the buffers: the work’s outputs claim the failure its inputs did, so a read of one of them names the root cause and the path back to it. This variant says only that the caller’s work was skipped, which is why it carries no payload — the failure the inputs held is not the caller’s to receive here, and minting a formatted message per skip would cost the loop that skips on every iteration.
Several
More than one thing went wrong at once, and the caller is owed all of them: a read naming buffers that several distinct failures claim, or a capture that was both doomed and abandoned.
Implementations§
Source§impl ServerError
impl ServerError
Sourcepub fn no_device_transport(operation: Collective) -> Self
pub fn no_device_transport(operation: Collective) -> Self
The error every collective returns on a runtime with no transport between devices.
Sourcepub fn is_refusal(&self) -> bool
pub fn is_refusal(&self) -> bool
Whether this is the kernel being refused before it ran, rather than something going wrong while running it.
The distinction a test harness or an autotuner needs: a kernel a backend cannot build at this configuration is a candidate to drop or a case to skip, while a fault, an out-of-memory or an IO failure is a defect that has to be reported. Answering it by reading the message is how a harness ends up accepting the second as the first.
Walks Several and Unwritten to
the roots, because a read of an unwritten buffer reports the failure
that stopped its writer and that is where the distinction lives. A
group answers yes only when every root does: one real failure among
refusals is still a real failure, and an empty group refuses nothing.
Sourcepub fn graph_state(reason: impl Into<String>) -> Self
pub fn graph_state(reason: impl Into<String>) -> Self
A graph-capture call the stream’s lifecycle does not allow — a
begin_capture without graph_prepare, a second overlapping capture, a
replay of an unknown graph, or an operation a capture window cannot
record. reason names the call and what was wrong with it.
Sourcepub fn graph_capture_unsupported() -> Self
pub fn graph_capture_unsupported() -> Self
The error the default (unsupported) graph-capture methods return, for a backend that has no graph support at all.
Trait Implementations§
Source§impl Clone for ServerError
impl Clone for ServerError
Source§impl Debug for ServerError
impl Debug for ServerError
Source§impl<'de> Deserialize<'de> for ServerError
impl<'de> Deserialize<'de> for ServerError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ServerError
impl Display for ServerError
Source§impl Error for ServerError
impl Error for ServerError
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<&ServerError> for ProfileError
A failure during a profiling window invalidates the measurement, whatever
the failure was. Every backend answers a launch, write or replay failure
this way, so the conversion lives here rather than five times over.
impl From<&ServerError> for ProfileError
A failure during a profiling window invalidates the measurement, whatever the failure was. Every backend answers a launch, write or replay failure this way, so the conversion lives here rather than five times over.
Source§fn from(error: &ServerError) -> Self
fn from(error: &ServerError) -> Self
Source§impl From<Box<ServerError>> for ProfileError
impl From<Box<ServerError>> for ProfileError
Source§fn from(source: Box<ServerError>) -> Self
fn from(source: Box<ServerError>) -> Self
Source§impl From<IoError> for ServerError
impl From<IoError> for ServerError
Source§impl From<LaunchError> for ServerError
impl From<LaunchError> for ServerError
Source§fn from(source: LaunchError) -> Self
fn from(source: LaunchError) -> Self
Auto Trait Implementations§
impl Freeze for ServerError
impl RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnsafeUnpin for ServerError
impl UnwindSafe for ServerError
Blanket Implementations§
impl<T> AnyError for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 more