pub struct TensorMapDescriptor {
pub data_type: TensorMapDataType,
pub global_address: usize,
pub global_dim: Vec<u64>,
pub global_strides: Vec<u64>,
pub box_dim: Vec<u32>,
pub element_strides: Vec<u32>,
pub interleave: TensorMapInterleave,
pub swizzle: TensorMapSwizzle,
pub l2_promotion: TensorMapL2Promotion,
pub oob_fill: TensorMapOobFill,
}Expand description
Host-side builder for the tiled flavour of cuTensorMapEncodeTiled.
Cap at 5 dimensions (the CUDA-driver hard limit). Validation:
rankmust equalglobal_dim.len()andbox_dim.len()andelement_strides.len();global_strides.len() == rank - 1.global_addressmust be 16-byte aligned (TMA requires it).- Every entry of
global_dimandbox_dimmust be non-zero.
Fields§
§data_type: TensorMapDataType§global_address: usize§global_dim: Vec<u64>§global_strides: Vec<u64>§box_dim: Vec<u32>§element_strides: Vec<u32>§interleave: TensorMapInterleave§swizzle: TensorMapSwizzle§l2_promotion: TensorMapL2Promotion§oob_fill: TensorMapOobFillImplementations§
Source§impl TensorMapDescriptor
impl TensorMapDescriptor
Sourcepub fn new(data_type: TensorMapDataType, global_address: usize) -> Self
pub fn new(data_type: TensorMapDataType, global_address: usize) -> Self
Construct a defaulted-shape descriptor. Caller must populate
global_dim, global_strides, box_dim, element_strides
before calling TensorMapDescriptor::validate.
Sourcepub fn validate(&self) -> Result<(), TmaEncodeError>
pub fn validate(&self) -> Result<(), TmaEncodeError>
Validate that all sizes line up and the global address is 16B
aligned. Returns Err(TmaEncodeError::*) on mismatch. Pure host
validation — does not call into the driver.
Trait Implementations§
Source§impl Clone for TensorMapDescriptor
impl Clone for TensorMapDescriptor
Source§fn clone(&self) -> TensorMapDescriptor
fn clone(&self) -> TensorMapDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TensorMapDescriptor
impl RefUnwindSafe for TensorMapDescriptor
impl Send for TensorMapDescriptor
impl Sync for TensorMapDescriptor
impl Unpin for TensorMapDescriptor
impl UnsafeUnpin for TensorMapDescriptor
impl UnwindSafe for TensorMapDescriptor
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