Skip to content

Releases: deaneeth/tinygpu

TinyGPU v2.0.0

26 Oct 19:14
9622620

Choose a tag to compare

TinyGPU 🐉⚡ — v2.0.0

🚀 What's New in v2.0.0

What's Changed

  • Introduces the v2.0.0 release of TinyGPU by @deaneeth in #1
  • Enhanced Instruction Set:
    • Added SHLD and SHST for robust shared memory operations.
    • Improved SYNC semantics for better thread coordination.
  • Visualizer Improvements:
    • Export execution as GIFs with enhanced clarity.
    • Added support for saving visuals directly from the simulator.
  • Refactored Core:
    • Simplified step semantics for better extensibility.
    • Optimized performance for larger thread counts.
  • CI/CD Updates:
    • Integrated linting (ruff, black) and testing workflows.
    • Automated builds and tests on GitHub Actions.
  • Documentation:
    • Expanded examples and added detailed usage instructions.

New Contributors

Full Changelog: v1.0.0...v2.0.0

TinyGPU v1.0.0

26 Oct 19:24
71600ff

Choose a tag to compare

🚀 TinyGPU v1.0.0 - Initial Stable Release

🐉 Overview

TinyGPU v1.0.0 marks the first complete and stable release of the project - a fully functional educational GPU simulator inspired by the Tiny8 CPU.
It provides a hands-on, visual way to understand how GPUs execute code in parallel - including per-thread registers, branching, synchronization, and global memory operations.

Full Changelog: https://github.com/deaneeth/tinygpu/commits/v1.0.0


✨ Highlights

  • 🧩 Complete TinyGPU Core

    • SIMT-style multi-threaded execution engine
    • Per-thread program counters & registers
    • Shared global memory
    • Full instruction set:
      SET, ADD, MUL, LD, ST, JMP, BEQ, BNE, SYNC, CSWAP
  • ⚙️ Functional Assembler

    • Supports labels (loop:), inline comments (; comment), and register/immediate operands.
    • Clean error handling and program structure validation.
  • 🧠 Visualization Engine

    • Cycle-by-cycle register, memory, and PC tracking.
    • Static and animated visualizations (matplotlib).
    • GIF export via imageio for educational demonstrations.
  • 🧮 Example Kernels Included

    • vector_add → parallel array addition
    • odd_even_sort → GPU-style bubble sort with CSWAP and SYNC
    • reduce_sum → parallel reduction (array summation)
    • test_loop & sync_test → simple control-flow and barrier examples
  • 🧰 Developer & CI Tooling

    • Modern Python packaging (pyproject.toml)
    • GitHub Actions CI: Ruff lint + Black format + Pytest
    • Lightweight dependency stack (numpy, matplotlib, imageio)

🧭 Educational Goals

TinyGPU is built for learning:

  • Visualize parallel execution, barriers, and thread divergence
  • Explore GPU ISA design with Python-level accessibility
  • Teach or self-learn how SIMT architectures coordinate memory and compute

🧑‍🎓 Perfect for students, educators, and hobbyists exploring GPU fundamentals.


🧰 Installation

git clone https://github.com/deaneeth/tinygpu.git
cd tinygpu
pip install -e .

▶️ Run Examples

python -m examples.run_odd_even_sort
python -m examples.run_reduce_sum
python -m examples.run_vector_add

🧩 File Structure

tinygpu/
├─ examples/
│  ├─ vector_add.tgpu
│  ├─ odd_even_sort.tgpu
│  ├─ reduce_sum.tgpu
│  ├─ run_vector_add.py
│  ├─ run_odd_even_sort.py
│  ├─ run_reduce_sum.py
│  ├─ run_test_loop.py
│  └─ run_sync_test.py
│
├─ src/
│  └─ tinygpu/
│     ├─ assembler.py
│     ├─ gpu.py
│     ├─ instructions.py
│     ├─ visualizer.py
│     └─ __init__.py
│
├─ tests/
├─ pyproject.toml
├─ requirements-dev.txt
└─ README.md

🧱 Contributors

Lead Developer: [Dineth Hettiarachchi](https://github.com/deaneeth)
Inspired by: [Tiny8 CPU Project](https://github.com/sql-hkr/tiny8)


🪪 License

MIT License - free to use, learn, and modify.
See [LICENSE](https://chatgpt.com/g/g-p-68fba3491ccc819187807d677b139590-tinygpu/c/LICENSE) for details.


🔮 Next Milestones

  • Prefix-scan and histogram kernels
  • Warp divergence visualization
  • Streamlit / web-based TinyGPU Playground
  • Real-time step-through simulator

🧡 Thank you for trying TinyGPU!
This v1.0.0 release lays the foundation for accessible GPU education -
lightweight, visual, and fun to explore.