#[repr(transparent)]pub struct MLCDeviceType(pub i32);MLCTypes only.Expand description
A device type for execution of a neural network.
See also Apple’s documentation
Tuple Fields§
§0: i32Implementations§
Source§impl MLCDeviceType
impl MLCDeviceType
Sourcepub const Any: Self
pub const Any: Self
The any device type. When selected, the framework will automatically use the appropriate devices to achieve the best performance.
Sourcepub const ANE: Self
pub const ANE: Self
The Apple Neural Engine device. When selected, the framework will use the Neural Engine to execute all layers that can be executed on it. Layers that cannot be executed on the ANE will run on the CPU or GPU. The Neural Engine device must be explicitly selected. MLDeviceTypeAny will not select the Neural Engine device. In addition, this device can be used with inference graphs only. This device cannot be used with a training graph or an inference graph that shares layers with a training graph.
Sourcepub const Count: Self
pub const Count: Self
The Apple Neural Engine device. When selected, the framework will use the Neural Engine to execute all layers that can be executed on it. Layers that cannot be executed on the ANE will run on the CPU or GPU. The Neural Engine device must be explicitly selected. MLDeviceTypeAny will not select the Neural Engine device. In addition, this device can be used with inference graphs only. This device cannot be used with a training graph or an inference graph that shares layers with a training graph.
Trait Implementations§
Source§impl Clone for MLCDeviceType
impl Clone for MLCDeviceType
Source§fn clone(&self) -> MLCDeviceType
fn clone(&self) -> MLCDeviceType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MLCDeviceType
impl Debug for MLCDeviceType
Source§impl Encode for MLCDeviceType
impl Encode for MLCDeviceType
Source§impl Hash for MLCDeviceType
impl Hash for MLCDeviceType
Source§impl Ord for MLCDeviceType
impl Ord for MLCDeviceType
Source§fn cmp(&self, other: &MLCDeviceType) -> Ordering
fn cmp(&self, other: &MLCDeviceType) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MLCDeviceType
impl PartialEq for MLCDeviceType
Source§fn eq(&self, other: &MLCDeviceType) -> bool
fn eq(&self, other: &MLCDeviceType) -> bool
self and other values to be equal, and is used by ==.