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.
A:M × Kmatrix with useMatrixUse::MatrixAB:K × Nmatrix with useMatrixUse::MatrixBC:M × Nmatrix with useMatrixUse::MatrixAccumulator- returns
D:M × Naccumulator equal toA × B + C
All operands must be dynamically uniform within every instance of the subgroup scope.
§Capability
Requires CooperativeMatrixKHR + SPV_KHR_cooperative_matrix.