#[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: i32
Implementations§
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more