Skip to content

abhisheksreesaila/mojo-gpu-tutorials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

mojo-gpu-tutorials

Hands-on tutorials for GPU programming in Mojo πŸ”₯ | Learn kernels, threads, blocks, memory layouts, and LayoutTensor with practical examples | Write once, run on NVIDIA, AMD, or Apple Silicon


πŸ“š Available Tutorials

# Topic MDX Colab Video
001 GPU Introduction & Basics πŸ““ MDX Open In Colab YouTube
002 Memory Layout & LayoutTensor πŸ““ MDX Open In Colab YouTube
003 Vector Addition πŸ““ MDX Open In Colab YouTube
004 Thread Management πŸ““ MDX Open In Colab YouTube
005 Shared Memory πŸ““ MDX Open In Colab YouTube
006 Pooling Operations πŸ““ MDX Open In Colab YouTube
007 Convolution πŸ““ MDX Open In Colab YouTube
008 MAX Graph Introduction - Open In Colab YouTube
009 Matrix Multiplication πŸ““ MDX Open In Colab YouTube
010 Functional Programming in Mojo πŸ““ MDX Open In Colab YouTube
011 Warp-Level Programming πŸ““ MDX Open In Colab YouTube
012 MAX Ecosystem - Open In Colab YouTube
013 Block Level Programming - Open In Colab YouTube

🎨 Interactive Visualizations

All tutorials include embedded interactive visualizers to help you understand GPU concepts visually!

πŸ’‘ Colab Users: Visualizations are embedded directly in the notebooks - no downloads needed! Just run and interact.

πŸ–₯️ MDX Users: Use VS Code's Live Preview extension to view visualizations locally. Right-click any HTML file in visualize/ folder β†’ Show Preview.


πŸš€ Getting Started with Colab (Recommended)

  1. Click any Colab badge from the tutorials table above
  2. Enable GPU: Runtime β†’ Change runtime type β†’ T4 GPU
  3. Run cells and explore embedded visualizations! πŸ”₯

πŸ“ Note: Mojo code in Colab must be in a single block with a main() function.


🏠 Running MDX Notebooks Locally (Advanced)

For a full notebook experience with code split across cells:

Setup:

git clone https://github.com/abhisheksreesaila/mojo-gpu-tutorials.git
cd mojo-gpu-tutorials
curl -fsSL https://pixi.sh/install.sh | sh  # Install Pixi
pixi add mojo                                # Install Mojo
pixi shell                                   # Activate environment
code .                                       # Open in VS Code

Install Extensions:

  • Markdown Lab - for running .mdx notebooks
  • Live Preview - for viewing HTML visualizations (right-click HTML files β†’ Show Preview)

Requirements: VS Code, Linux/macOS (Windows: WSL2), GPU optional


πŸ™ Acknowledgements

The code examples and implementations in these tutorials are adapted from Modular's GPU Puzzles and the official Mojo documentation. These materials have been reorganized and enhanced with detailed explanations to make GPU programming concepts more accessible to learners.

Special thanks to the Modular team for their excellent documentation and examples.


πŸ’¬ Need Help?


Happy GPU Programming! πŸ”₯πŸš€

About

Hands-on tutorials for GPU programming in Mojo πŸ”₯ | Learn kernels, threads, blocks, memory layouts, and LayoutTensor with practical examples | Write once, run on NVIDIA, AMD, or Apple Silicon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors