pub enum GpuError {
DriverLibraryUnavailable {
reason: String,
},
DriverSymbolMissing {
reason: String,
},
DriverCallFailed {
reason: String,
},
CalibrationFailed {
reason: String,
},
NoDeviceKernel {
reason: String,
},
}Expand description
Typed error for src/gpu/*.rs operations.
Variants§
The CUDA driver shared library (libcuda.so / nvcuda.dll /
libcuda.dylib) or one of its sibling stubs (cuSOLVER, cuSPARSE)
could not be loaded from any of the searched candidates.
DriverSymbolMissing
A required CUDA / cuBLAS / cuSOLVER / cuSPARSE symbol was missing
from a loaded library (i.e. libloading::Library::get returned an
error for a name we need).
DriverCallFailed
A CUDA driver / cuSOLVER / cuSPARSE C API call returned a non-zero
status code, or a cudarc safe wrapper (context bind, stream
create, cuBLAS init, alloc, memcpy, gemm, synchronize) failed.
CalibrationFailed
Runtime throughput calibration produced an unusable measurement (non-positive elapsed time, non-finite GB/s or GFLOPS).
NoDeviceKernel
No device kernel exists for the requested GPU code path on this build.
Device kernels are added opportunistically as accelerations; the absence
of one is a permanently-possible, correctly-handled condition — not a
defect — because the CPU path it falls back to is the correct reference
computation. Callers treat this as a sentinel to fall back to the CPU
path silently (no panic, no error log). Distinct from DriverCallFailed
so the dispatcher can tell “no kernel for this path” apart from “the
device refused”. Carries a short reason for diagnostics, e.g. the kernel
name. (Any GPU acceleration roadmap belongs in an issue, not here.)
Trait Implementations§
Source§impl Error for GpuError
impl Error for GpuError
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 GpuError
impl RefUnwindSafe for GpuError
impl Send for GpuError
impl Sync for GpuError
impl Unpin for GpuError
impl UnsafeUnpin for GpuError
impl UnwindSafe for GpuError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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