How capple217/tiled-sgemm works
This repository is a CUDA SGEMM optimization and measurement project. Its main workflow is to run a selected kernel stage, verify its result, time it against a precision-matched cuBLAS baseline, and compare performance with device peaks. Separate capabilities cover template autotuning and Nsight Compute profiling, with results summarized and plotted. Stage implementations and several core utilities are identified by the supplied tree and excerpts; some internal dispatch details are not shown, so those links are omitted.
Main entry points: registry.cu Kernel registry · bench.cu Benchmark driver · collate.py Run summary · check.cu GPU correctness check
Components 22
SGEMM stages
- Kernel registry
src/registry.cu - Naive kernel
kernels/01_naive.cu - Coalesced kernel
kernels/02_coalesced.cu - Shared-memory tiling
kernels/03_smem_tiling.cu - 1D register tiling
kernels/04_blocktiling_1d.cu - 2D register tiling
kernels/05_blocktiling_2d.cu - Vectorized kernel
kernels/06_vectorized.cu - Warp tiling
kernels/07_warptiling.cu - TF32 WMMA kernel
kernels/09_tf32_wmma.cu
Numerics and reference
- GPU correctness check
src/check.cu - Host numerics
include/sgemm/host_utils.hpp - Precision policy
include/sgemm/precision.hpp - cuBLAS reference
src/cublas_ref.cu
Benchmark and tuning
- Benchmark driver
bench/bench.cu - Template autotuner
bench/autotune.cu - CUDA-event timing
include/sgemm/timing.hpp - Device and peak info
src/device_info.cu
Profiling and reports
- Nsight profiling
profiling/profile.sh - Counter summaries
profiling/summarize.py - Performance plots
scripts/plot.py - Run summary
scripts/collate.py
Other components
- Engineer
Connections 23
- Engineer → Benchmark driver: runs sweep
README.md - Benchmark driver → Kernel registry: iterates kernels
README.md - Kernel registry → Naive kernel: dispatches
README.md - Kernel registry → Coalesced kernel: dispatches
README.md - Kernel registry → Shared-memory tiling: dispatches
README.md - Kernel registry → 1D register tiling: dispatches
README.md - Kernel registry → 2D register tiling: dispatches
README.md - Kernel registry → Vectorized kernel: dispatches
README.md - Kernel registry → Warp tiling: dispatches
README.md - Kernel registry → TF32 WMMA kernel: dispatches
README.md - Benchmark driver → GPU correctness check: verifies results
README.md - Benchmark driver → cuBLAS reference: compares against
README.md - Benchmark driver → CUDA-event timing: times runs
include/sgemm/timing.hpp - Benchmark driver → Device and peak info: records peaks
README.md - GPU correctness check → Host numerics: uses tolerances
- Host numerics → Precision policy: uses precision
include/sgemm/host_utils.hpp - Engineer → Template autotuner: tunes families
README.md - Engineer → Nsight profiling: profiles stages
README.md - Nsight profiling → Counter summaries: summarizes counters
README.md - Engineer → Performance plots: plots results
README.md - Engineer → Run summary: builds run summary
README.md - Run summary → Performance plots: uses plotting
scripts/collate.py - Run summary → Counter summaries: uses metrics
scripts/collate.py