pub enum DispatchDevice {
Host(HostDevice),
Autodiff(Box<DispatchDevice>, GradientCheckpointingStrategy),
}Variants§
Host(HostDevice)
Autodiff(Box<DispatchDevice>, GradientCheckpointingStrategy)
Implementations§
Source§impl DispatchDevice
impl DispatchDevice
pub fn identity(&self) -> Option<DeviceIdentity>
pub fn autodiff(device: impl Into<Self>) -> Self
pub fn autodiff_with_gradient_checkpointing( device: impl Into<Self>, strategy: GradientCheckpointingStrategy, ) -> Self
pub fn context(&self) -> AutodiffContext
pub fn gradient_checkpointing_strategy(&self) -> GradientCheckpointingStrategy
pub fn with_context(&self, context: AutodiffContext) -> Self
Trait Implementations§
Source§impl Clone for DispatchDevice
impl Clone for DispatchDevice
Source§impl Debug for DispatchDevice
impl Debug for DispatchDevice
Source§impl Default for DispatchDevice
impl Default for DispatchDevice
Source§impl Device for DispatchDevice
impl Device for DispatchDevice
Source§impl DeviceOps for DispatchDevice
impl DeviceOps for DispatchDevice
Source§fn defaults(&self) -> Option<DeviceSettings>
fn defaults(&self) -> Option<DeviceSettings>
Device-specific defaults for dynamically selected or remote backends.
Static backends may retain defaults derived from their element types.
impl Eq for DispatchDevice
Source§impl From<HostDevice> for DispatchDevice
impl From<HostDevice> for DispatchDevice
Source§fn from(device: HostDevice) -> Self
fn from(device: HostDevice) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DispatchDevice
impl RefUnwindSafe for DispatchDevice
impl Send for DispatchDevice
impl Sync for DispatchDevice
impl Unpin for DispatchDevice
impl UnsafeUnpin for DispatchDevice
impl UnwindSafe for DispatchDevice
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.