pub enum CoopMma {
Fill {
value: Variable,
},
Load {
value: Variable,
stride: Variable,
layout: Option<MatrixLayout>,
},
Execute {
mat_a: Variable,
mat_b: Variable,
mat_c: Variable,
},
Store {
mat: Variable,
stride: Variable,
layout: MatrixLayout,
},
Cast {
input: Variable,
},
}
Expand description
Cooperative Matrix-Multiply and Accumulate Instruction.
Variants§
Fill
Fill the matrix with the value.
Load
Load the value into the matrix given the stride.
Execute
Executes D=A*B+C;
For implementing a matmul, D=C
: C+=A*B
Store
Store the matrix in an output variable following the stride and the layout.
Cast
Cast a fragment to another type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CoopMma
impl<'de> Deserialize<'de> for CoopMma
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl OperationReflect for CoopMma
impl OperationReflect for CoopMma
Source§type OpCode = CmmaOpCode
type OpCode = CmmaOpCode
Type of the op codes for this operation
Source§fn args(&self) -> Option<Vec<Variable>>
fn args(&self) -> Option<Vec<Variable>>
Get the list of arguments for this operation. If not all arguments are
Variable
, returns
None
instead.Source§fn from_code_and_args(op_code: Self::OpCode, args: &[Variable]) -> Option<Self>
fn from_code_and_args(op_code: Self::OpCode, args: &[Variable]) -> Option<Self>
Create typed operation from an opcode and a list of arguments. Returns
None
if not all
arguments are Variable
.Source§fn is_commutative(&self) -> bool
fn is_commutative(&self) -> bool
Whether this operation is commutative (arguments can be freely reordered). Ignored for
single argument operations.
impl Eq for CoopMma
impl StructuralPartialEq for CoopMma
Auto Trait Implementations§
impl Freeze for CoopMma
impl RefUnwindSafe for CoopMma
impl Send for CoopMma
impl Sync for CoopMma
impl Unpin for CoopMma
impl UnwindSafe for CoopMma
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