pub enum LdMatrixForm {
M8N8B16,
M8N16B4x16P64,
M8N16B6x16P32,
M16N16B8,
M16N16B4x16P64,
M16N16B6x16P32,
}Expand description
The shape of each matrix an ldmatrix loads, and how its elements are laid out in shared
memory and in the 32-bit registers they land in. Every row is 16 bytes of shared memory whose
address one unit supplies, eight units per 8 rows.
The B4x16P64 and B6x16P32 forms read sixteen packed 4-bit (6-bit) values followed by 64 (32)
bits of padding per row, and widen each value into the low bits of its own byte in the
registers. An e2m1 operand of the mma kinds that take 8-bit containers sits in bits 2 to 5
of its byte instead, so a 4-bit load must be shifted left by two before it feeds one.
Variants§
M8N8B16
8x8 16-bit elements, transposition optional.
M8N16B4x16P64
8x16 4-bit elements widened to bytes, never transposed.
M8N16B6x16P32
8x16 6-bit elements widened to bytes, never transposed.
M16N16B8
16x16 8-bit elements, always transposed.
M16N16B4x16P64
16x16 4-bit elements widened to bytes, always transposed.
M16N16B6x16P32
16x16 6-bit elements widened to bytes, always transposed.
Implementations§
Source§impl LdMatrixForm
impl LdMatrixForm
Sourcepub fn registers_per_matrix(self) -> usize
pub fn registers_per_matrix(self) -> usize
The 32-bit registers each unit receives per matrix.
Sourcepub fn transposition(self) -> MatrixMoveTransposition
pub fn transposition(self) -> MatrixMoveTransposition
Whether this form may, must, or cannot transpose.
Sourcepub fn admits_matrix_count(self, num_matrices: usize) -> bool
pub fn admits_matrix_count(self, num_matrices: usize) -> bool
Whether one instruction of this form can load num_matrices matrices.
Trait Implementations§
Source§impl Clone for LdMatrixForm
impl Clone for LdMatrixForm
Source§fn clone(&self) -> LdMatrixForm
fn clone(&self) -> LdMatrixForm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LdMatrixForm
Source§impl Debug for LdMatrixForm
impl Debug for LdMatrixForm
Source§impl<'de> Deserialize<'de> for LdMatrixForm
impl<'de> Deserialize<'de> for LdMatrixForm
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LdMatrixForm, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LdMatrixForm, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for LdMatrixForm
Source§impl Hash for LdMatrixForm
impl Hash for LdMatrixForm
Source§impl Ord for LdMatrixForm
impl Ord for LdMatrixForm
Source§fn cmp(&self, other: &LdMatrixForm) -> Ordering
fn cmp(&self, other: &LdMatrixForm) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl Parsable for LdMatrixForm
impl Parsable for LdMatrixForm
Source§type Parsed = LdMatrixForm
type Parsed = LdMatrixForm
Source§fn parse<'__pliron_parse>(
state_stream: &mut Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'__pliron_parse>>, SourcePosition>>>, State<'__pliron_parse>>,
arg: <LdMatrixForm as Parsable>::Arg,
) -> Result<(<LdMatrixForm as Parsable>::Parsed, Commit<()>), Commit<Tracked<<Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'__pliron_parse>>, SourcePosition>>>, State<'__pliron_parse>> as StreamOnce>::Error>>>
fn parse<'__pliron_parse>( state_stream: &mut Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'__pliron_parse>>, SourcePosition>>>, State<'__pliron_parse>>, arg: <LdMatrixForm as Parsable>::Arg, ) -> Result<(<LdMatrixForm as Parsable>::Parsed, Commit<()>), Commit<Tracked<<Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'__pliron_parse>>, SourcePosition>>>, State<'__pliron_parse>> as StreamOnce>::Error>>>
into on Parser::parse_stream to get the final ParseResult.
Use state_stream.state as necessary.Source§fn parser<'a>(
arg: Self::Arg,
) -> Box<dyn Parser<Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'a>>, SourcePosition>>>, State<'a>>, PartialState = (), Output = Self::Parsed> + 'a>where
Self::Parsed: 'a,
fn parser<'a>(
arg: Self::Arg,
) -> Box<dyn Parser<Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'a>>, SourcePosition>>>, State<'a>>, PartialState = (), Output = Self::Parsed> + 'a>where
Self::Parsed: 'a,
Source§impl PartialEq for LdMatrixForm
impl PartialEq for LdMatrixForm
Source§impl PartialOrd for LdMatrixForm
impl PartialOrd for LdMatrixForm
Source§impl Printable for LdMatrixForm
impl Printable for LdMatrixForm
Source§impl Serialize for LdMatrixForm
impl Serialize for LdMatrixForm
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for LdMatrixForm
Auto Trait Implementations§
impl Freeze for LdMatrixForm
impl RefUnwindSafe for LdMatrixForm
impl Send for LdMatrixForm
impl Sync for LdMatrixForm
impl Unpin for LdMatrixForm
impl UnsafeUnpin for LdMatrixForm
impl UnwindSafe for LdMatrixForm
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
Source§impl<T> CompilationArg for T
impl<T> CompilationArg for T
Source§fn dynamic_cast<Arg: CompilationArg>(&self) -> Arg
fn dynamic_cast<Arg: CompilationArg>(&self) -> Arg
impl<T> CubeComptime for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.Source§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more