# flame/how-to-optimize-gemm

Repository: https://github.com/flame/how-to-optimize-gemm
Canonical: https://ross.abutalabs.com/products/how-to-optimize-gemm
Language: C
License Family: other
Topics: gemm, matrix-multiplication, gotoblas, blis, code-optimization
Last push: 2023-07-29T07:16:04+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3676, "days_push": 1131, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2035, forks 366 (observed 2026-08-28T04:06:07.945842+00:00)

## What it is
A tutorial wiki repository by Prof. Robert van de Geijn teaching step-by-step how to optimize general matrix-matrix multiplication (GEMM) using the GotoBLAS/BLIS approach. It contains C code examples progressing from naive implementations to blocked, packed, cache-optimized kernels.

## Use cases
- learn how to optimize matrix multiplication in C
- understand the GotoBLAS/BLIS approach to GEMM optimization
- study cache blocking and memory packing for dense linear algebra
- teach high-performance computing with step-by-step GEMM examples
- improve performance of my BLAS-like kernel code

## When to choose
- you want to learn CPU-level optimization techniques like blocking, packing, and register tiling for matrix multiplication
- you are teaching or studying high-performance dense linear algebra
- you want to understand how BLAS libraries achieve near-peak GEMM performance

## When to avoid
- you need a production-ready, optimized BLAS library - use OpenBLAS, BLIS, or MKL instead
- you are optimizing GEMM for GPUs rather than CPUs
- you want a maintained software library with a stable API and license

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: benchmarking, developer-tools
- domain: performance, tutorials, machine-learning
- platform: cpp, windows
- tags: gemm, matrix-multiplication, gotoblas, blis, code-optimization, high-performance-computing, tutorial, algorithms, linux, macos

## Member repositories
- flame/how-to-optimize-gemm (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:07.945842+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:59:21.476114+00:00, confidence not recorded.
  - readme: https://github.com/flame/how-to-optimize-gemm (fetched 2026-08-28T04:06:07.945842+00:00, sha 9f69ed56d663)
- Data as of 2026-08-30T08:39:29.467469+00:00.
