#[repr(i32)]pub enum DataLayout {
KYxDepthBatch = 0,
KYxBatchDepth = 1,
KBatchYxDepth = 2,
KBatchDepthYx = 3,
KBatchDepthYx4 = 4,
KBatchDepthYx32 = 5,
}Expand description
Describes how a convolution input or output layer’s data is formatted.
Variants§
KYxDepthBatch = 0
Naming convention: Y <-> row or height X <-> column or width Batch <-> batch, or N Depth <-> feature, or channel TODO(timshen): turn them into cuDNN names, e.g. kNCHW.
Note: In cudnn, kBatchDepthYX4 and kBatchDepthYX32 are the same layout (namely, NCHW_VECT_C). It differentiates between these two by using a different data type (int8x4 vs int8x32). In StreamExecutor we use different layouts for these, because we don’t usually pass an explicit data type to StreamExecutor functions.
KYxBatchDepth = 1
KBatchYxDepth = 2
cuDNN’s NHWC layout
KBatchDepthYx = 3
cuDNN’s NCHW layout
KBatchDepthYx4 = 4
cuDNN’s NCHW_VECT_C with 4-elem vectors (e.g. int8x4)
KBatchDepthYx32 = 5
cuDNN’s NCHW_VECT_C with 32-elem vects (e.g. int8x32)
Implementations§
Source§impl DataLayout
impl DataLayout
Source§impl DataLayout
impl DataLayout
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for DataLayout
impl Clone for DataLayout
Source§fn clone(&self) -> DataLayout
fn clone(&self) -> DataLayout
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataLayout
impl Debug for DataLayout
Source§impl Default for DataLayout
impl Default for DataLayout
Source§fn default() -> DataLayout
fn default() -> DataLayout
Source§impl From<DataLayout> for i32
impl From<DataLayout> for i32
Source§fn from(value: DataLayout) -> i32
fn from(value: DataLayout) -> i32
Source§impl Hash for DataLayout
impl Hash for DataLayout
Source§impl Ord for DataLayout
impl Ord for DataLayout
Source§impl PartialEq for DataLayout
impl PartialEq for DataLayout
Source§impl PartialOrd for DataLayout
impl PartialOrd for DataLayout
Source§impl TryFrom<i32> for DataLayout
impl TryFrom<i32> for DataLayout
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<DataLayout, UnknownEnumValue>
fn try_from(value: i32) -> Result<DataLayout, UnknownEnumValue>
impl Copy for DataLayout
impl Eq for DataLayout
impl StructuralPartialEq for DataLayout
Auto Trait Implementations§
impl Freeze for DataLayout
impl RefUnwindSafe for DataLayout
impl Send for DataLayout
impl Sync for DataLayout
impl Unpin for DataLayout
impl UnwindSafe for DataLayout
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)