pub enum GpuMode {
Auto,
Required,
Off,
}Expand description
Fail-closed GPU residency mode (issue #1017).
Distinct from GpuPolicy, which governs opportunistic per-kernel dispatch.
GpuMode is the process-wide residency contract the resident solver
consults through crate::device_runtime::GpuRuntime::global_or_fail:
GpuMode::Auto— use the device when the probe admits it, fall back to CPU otherwise (the current, working behavior; preserved bit-for-bit).GpuMode::Required— the device MUST be available; if the runtime is absent the resident path returns a structured error instead of silently running on the CPU. This is the fail-closed guard the reviewers asked for.GpuMode::Off— never use the device.
Variants§
Auto
Use the device when available; fall back to CPU otherwise.
Required
Require the device; error (do not fall back) when it is unavailable.
Off
Never use the device.
Implementations§
Trait Implementations§
impl Copy for GpuMode
Source§impl<'de> Deserialize<'de> for GpuMode
impl<'de> Deserialize<'de> for GpuMode
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GpuMode
impl StructuralPartialEq for GpuMode
Auto Trait Implementations§
impl Freeze for GpuMode
impl RefUnwindSafe for GpuMode
impl Send for GpuMode
impl Sync for GpuMode
impl Unpin for GpuMode
impl UnsafeUnpin for GpuMode
impl UnwindSafe for GpuMode
Blanket Implementations§
impl<T> Boilerplate 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
Mutably borrows from an owned value. Read more
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> 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>
Converts
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>
Converts
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