AIAny
AI Infra2024
Icon for item

tiny-gpu

A minimal GPU written in under 15 SystemVerilog files to teach how GPUs execute parallel kernels from the ground up. Includes an 11-instruction ISA, multiple cores with ALUs and load-store units, a fetch-decode-execute pipeline, and matrix kernels.

Introduction

Almost everyone learns GPUs top-down — CUDA grids, warps, occupancy — without ever seeing the silicon those abstractions ride on. tiny-gpu inverts that: the whole design fits in under 15 SystemVerilog files, small enough to read end-to-end in an afternoon, yet complete enough to trace one instruction from the dispatcher through an ALU and finally see why SIMD and memory bandwidth dictate the programming model you already use.

What Sets It Apart
  • Every stage a real GPU has is present, just shrunk: a device control register, a thread dispatcher, multiple compute cores (each with ALUs, load-store units, register files, and a scheduler), and dedicated program/data memory controllers. Nothing is hand-waved into a black box.
  • An 11-instruction ISA runs working matrix add and multiply kernels under simulation, so "threads executing the same instruction over different data" becomes something you watch in an execution trace rather than read about.
  • It runs on open tooling (iverilog + cocotb), so stepping through the hardware costs a Python test, not a vendor license or an FPGA board.
  • The docs deliberately mark what's left out — caching, pipelining, warp scheduling, memory coalescing — and explain why each matters, pointing toward production hardware instead of pretending to be it.
Who Should Read It

Great fit if you write CUDA or Triton and want a concrete mental model of what runs underneath, or if you're studying computer architecture and want a codebase short enough to hold in your head. Look elsewhere if you need a synthesizable GPU for real silicon: there's no graphics pipeline, no cache hierarchy, and no performance tuning. The design optimizes for legibility over realism, and that trade-off is the entire point.

Information

  • Websitegithub.com
  • OrganizationsAdam Majmudar
  • Authorsadam-maj (Adam Majmudar)
  • Published date2024/04/09

More Items

GitHub
AI Infra2025

Defines a vendor-neutral JSON/YAML semantic model specification and tooling to exchange metrics, dimensions, lineage and other business semantics across analytics, AI and BI platforms; includes a core spec, validators, converters (dbt, GoodData, Salesforce) and example models.

GitHub
AI Train2025

An asynchronous, high-throughput framework for large-scale reinforcement learning and agentic training that scales to 1T+ MoE models and 1000+ GPUs, with native verifiers integration, end-to-end SFT/RL/evals, and Slurm/Kubernetes deployment; requires NVIDIA GPUs.

GitHub

Runs a self-hosted meeting bot and transcription API that joins Google Meet, Teams and Zoom and streams speaker-attributed transcripts in real time. Compiles meetings into a git-backed Markdown workspace and runs sandboxed agents on your infrastructure; Apache-2.0 and air-gap capable.