Glossary

Matrix multiplication (GEMM)

Beginner

Multiplying two grids of numbers to make a third. Each box in the answer is a long row of multiplications added up.

Novice

C=ABC = AB, where AA is M×KM \times K and BB is K×NK \times N. Every one of the M×NM \times N outputs is a sum of KK products, so it takes MNKMNK multiply-adds. GEMM (general matrix multiply) is the library name for it.

Expert

2MNK2MNK FLOPs over MK+KN+MNMK + KN + MN values, so its intensity grows with the smallest dimension. With M=1M = 1 it degenerates to a matrix-vector product (GEMV), which is always memory-bound.