Skip to content

Repository files navigation

SGEMM Optimization

CIPagesLicense: MITCUDAC++

English | 简体中文

This repository is a CUDA SGEMM case study presented as a technical whitepaper and kernel academy. It starts from readable FP32 baselines, climbs through tiled, bank-conflict-aware, double-buffer, and guarded Tensor Core WMMA paths, then frames every performance claim with explicit validation boundaries.

Why it stands out

  • Readable optimization ladder: every kernel stage exists to expose one bottleneck shift.
  • Evidence-first public story: correctness policy, benchmark scope, and local-versus-CI trust boundaries stay attached to every claim.
  • Interview-grade positioning: the Pages site is written so the project can be explained, defended, and audited under technical pressure.
  • Bilingual mirrored docs: English and Chinese routes stay structurally aligned across the full public site.

Quick start

git clone https://github.com/LessUp/sgemm-optimization.git
cd sgemm-optimization
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
./build/bin/sgemm_benchmark -a
ctest --test-dir build

Runtime tests and benchmarks require a local CUDA-capable machine. Hosted CI validates formatting, CUDA compilation, docs-site checks, route integrity, and Pages buildability.

GitHub Pages entry points

The README is the executive summary. The long-form technical narrative lives on Pages.

GoalEntry point
Open English homeEnglish Home
Open Chinese home中文首页
Get oriented quicklyProject Guide
Inspect system structureArchitecture
Study the kernel ladderAcademy
Check what the evidence provesValidation
Trace papers and related reposResearch Desk
Read contributor workflow and validation commandsCONTRIBUTING.md

Validation boundary

EnvironmentWhat it can prove
Hosted CIFormatting, CUDA compilation, docs structure, route integrity, Pages buildability
Local CUDA GPURuntime correctness, fallback behavior, benchmark performance

This split is deliberate. CI catches build and repository-surface issues early, but only local GPU execution can validate runtime behavior and speed claims.

Source map

src/kernels/ CUDA SGEMM implementations
src/utils/ CUDA RAII, verification, benchmark helpers
src/main.cu benchmark CLI
tests/ Google Test coverage against cuBLAS
docs/ VitePress whitepaper and academy, mirrored under /en and /zh

License

MIT. See LICENSE.md.

About

Bilingual CUDA SGEMM optimization tutorial and reference implementation, from naive kernels to Tensor Core WMMA | 双语 CUDA SGEMM 优化教程与参考实现,从朴素内核到 Tensor Core WMMA

Topics

Resources

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages