pub struct SubgroupMmaConstantMatrixOperation<'c> { /* private fields */ }
Expand description
A subgroup_mma_constant_matrix
operation. GPU warp synchronous constant matrix.
The gpu.subgroup_mma_constant_matrix
creates a !gpu.mma_matrix
with
constant elements.
The operation takes a scalar input and return a !gpu.mma_matrix
where
each element of is equal to the operand constant. The destination
mma_matrix type must have elememt type equal to the constant type. Since
the layout of !gpu.mma_matrix
is opaque this only support setting all the
elements to the same value.
This op is meant to be used along with gpu.subgroup_mma_compute
.
Example:
%0 = gpu.subgroup_mma_constant_matrix %a :
!gpu.mma_matrix<16x16xf16, "AOp">
%1 = gpu.subgroup_mma_constant_matrix %b :
!gpu.mma_matrix<16x16xf32, "COp">
Implementations§
source§impl<'c> SubgroupMmaConstantMatrixOperation<'c>
impl<'c> SubgroupMmaConstantMatrixOperation<'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>
) -> SubgroupMmaConstantMatrixOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> SubgroupMmaConstantMatrixOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn res(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn value(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<SubgroupMmaConstantMatrixOperation<'c>> for Operation<'c>
impl<'c> From<SubgroupMmaConstantMatrixOperation<'c>> for Operation<'c>
source§fn from(operation: SubgroupMmaConstantMatrixOperation<'c>) -> Self
fn from(operation: SubgroupMmaConstantMatrixOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for SubgroupMmaConstantMatrixOperation<'c>
impl<'c> !Send for SubgroupMmaConstantMatrixOperation<'c>
impl<'c> !Sync for SubgroupMmaConstantMatrixOperation<'c>
impl<'c> Unpin for SubgroupMmaConstantMatrixOperation<'c>
impl<'c> UnwindSafe for SubgroupMmaConstantMatrixOperation<'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