Overview ⢠Why Mojo ⢠Getting Started ⢠Development ⢠Community
"For the things we have to learn before we can do them, we learn by doing them." ā Aristotle, (Nicomachean Ethics)
Welcome to Mojoš„ GPU Puzzles ā an interactive approach to learning GPU programming through hands-on puzzle solving. Instead of traditional textbook learning, you'll immediately dive into writing real GPU code and seeing the results.
Start Learning Now š https://builds.modular.com/puzzles
š¬ Subscribe to updates to get notified when new puzzles are released!
Mojo represents a revolutionary approach to GPU programming, making massive parallelism accessible while maintaining systems-level performance:
- š Python-like Syntax with systems programming capabilities
- ā” Zero-cost Abstractions that compile to efficient machine code
- š”ļø Strong Type System catching errors at compile time
- š Built-in Tensor Support with hardware-aware optimizations
- š§ Direct Hardware Access to CPU and GPU intrinsics
- š Cross-Hardware Portability for CPUs and GPUs
- šÆ Ergonomic Improvements over traditional C/C++
You'll need a compatible GPU to run the examples.
-
Clone this repository
git clone https://github.com/modular/mojo-gpu-puzzles cd mojo-gpu-puzzles
-
Install a package manager to run the Mojoš„ programs:
Option 1:
uv
(recommended for users)Install:
curl -fsSL https://astral.sh/uv/install.sh | sh
Update:
uv self update
Create a virtual environment:
uv venv && source .venv/bin/activate
Option 2: pixi (recommended for contributors)
Install:
curl -fsSL https://pixi.sh/install.sh | sh
Update:
pixi self-update
-
Start solving puzzles!
We use pixi
for development as it includes uv
and also supports conda packages (like mdbook
from the conda-forge
channel) needed for development workflows.
# Build and serve the book
pixi run book
# Test solutions on GPU
pixi run tests
# Format code
pixi run format
We welcome contributions! Whether it's:
- š Improving explanations
- š Fixing bugs (report bug)
- š” Suggesting improvements (request feature)
Please feel free to:
- Fork the repository
- Create your feature branch
- Submit a pull request
Join our vibrant community to discuss GPU programming, share solutions, and get help!
- Thanks to all our contributors
- Initial puzzles are heavily inspired by GPU Puzzles
- Built with mdBook
This project is licensed under the LLVM License - see the LICENSE file for details.
Built with ā¤ļø by the Modular team