Skip to main content

mul_add

Function mul_add 

Source
pub fn mul_add<TA, TB, TC, const M: u32, const N: u32, const K: u32>(
    a: CooperativeMatrix<TA, { _ }, M, K>,
    b: CooperativeMatrix<TB, { _ }, K, N>,
    c: CooperativeMatrix<TC, { _ }, M, N>,
) -> CooperativeMatrix<TC, { _ }, M, N>
Expand description

Linear-algebraic matrix multiply of A by B and then component-wise add C.

The order of operations is implementation-dependent. All matrices must have the same scope, which is always subgroup here.

All operands must be dynamically uniform within every instance of the subgroup scope.

§Capability

Requires CooperativeMatrixKHR + SPV_KHR_cooperative_matrix.