pub struct WMMAOperation<'c> { /* private fields */ }
Expand description
A wmma
operation. MLIR wrapper for RDNA3 wmma instructions.
The amdgpu.wmma
op is an MLIR wrapper around intrinsics
for various wmma
instructions in the RDNA3 architecture, which perform
a 16x16 matrix multiplication for different data types.
When emitting f16->f16 (or bf16->bf16) wmma the output is a 16xf16 (or 16xbf16) vector containing only 8 valid values:
- If
subwordOffset
is 0, then the output is stored at indices 0, 2, 4, …, 14. - If
subwordOffset
is 1, then the output is stored at indices 1, 3, 5, …, 15.
unsignedA
and unsignedB
flag that the int8
LLVM inputs are unsigned.
The clamp
flag is used to saturate the output of type T to numeric_limits
Implementations§
source§impl<'c> WMMAOperation<'c>
impl<'c> WMMAOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> WMMAOperationBuilder<'c, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> WMMAOperationBuilder<'c, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn dest_d(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn source_a(&self) -> Result<Value<'c, '_>, Error>
pub fn source_b(&self) -> Result<Value<'c, '_>, Error>
pub fn dest_c(&self) -> Result<Value<'c, '_>, Error>
pub fn subword_offset(&self) -> Result<IntegerAttribute<'c>, Error>
pub fn set_subword_offset(&mut self, value: IntegerAttribute<'c>)
pub fn remove_subword_offset(&mut self) -> Result<(), Error>
pub fn unsigned_a(&self) -> Result<Attribute<'c>, Error>
pub fn set_unsigned_a(&mut self, value: Attribute<'c>)
pub fn remove_unsigned_a(&mut self) -> Result<(), Error>
pub fn unsigned_b(&self) -> Result<Attribute<'c>, Error>
pub fn set_unsigned_b(&mut self, value: Attribute<'c>)
pub fn remove_unsigned_b(&mut self) -> Result<(), Error>
pub fn clamp(&self) -> Result<Attribute<'c>, Error>
pub fn set_clamp(&mut self, value: Attribute<'c>)
pub fn remove_clamp(&mut self) -> Result<(), Error>
Trait Implementations§
source§impl<'c> From<WMMAOperation<'c>> for Operation<'c>
impl<'c> From<WMMAOperation<'c>> for Operation<'c>
source§fn from(operation: WMMAOperation<'c>) -> Self
fn from(operation: WMMAOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for WMMAOperation<'c>
impl<'c> !Send for WMMAOperation<'c>
impl<'c> !Sync for WMMAOperation<'c>
impl<'c> Unpin for WMMAOperation<'c>
impl<'c> UnwindSafe for WMMAOperation<'c>
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