Releases: deaneeth/tinygpu
TinyGPU v2.0.0
TinyGPU 🐉⚡ — v2.0.0
🚀 What's New in v2.0.0
What's Changed
- Enhanced Instruction Set:
- Added
SHLDandSHSTfor robust shared memory operations. - Improved
SYNCsemantics for better thread coordination.
- Added
- 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.
- Integrated linting (
- Documentation:
- Expanded examples and added detailed usage instructions.
New Contributors
Full Changelog: v1.0.0...v2.0.0
TinyGPU v1.0.0
🚀 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.
- Supports labels (
-
🧠 Visualization Engine
- Cycle-by-cycle register, memory, and PC tracking.
- Static and animated visualizations (
matplotlib). - GIF export via
imageiofor educational demonstrations.
-
🧮 Example Kernels Included
vector_add→ parallel array additionodd_even_sort→ GPU-style bubble sort withCSWAPandSYNCreduce_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)
- Modern Python packaging (
🧭 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.