mojo-gpu-fundamentals

Translate CUDA-centric GPU concepts into Mojo equivalents for portable programming across GPU vendors.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/Gioggio03/Mojo --skill mojo-gpu-fundamentals-gioggio03
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mojo-gpu-fundamentals
Source: https://github.com/Gioggio03/Mojo/tree/main/.agents/skills/mojo-gpu-fundamentals
Command: npx skills add https://github.com/Gioggio03/Mojo --skill mojo-gpu-fundamentals-gioggio03

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill provides a structured guide to programming GPUs using Mojo, replacing CUDA-centric notions with Mojo equivalents to help developers write portable GPU code without relying on CUDA syntax.

Core Features & Use Cases

  • Maps CUDA concepts to Mojo GPU programming primitives (kernels, buffers, synchronization).
  • Offers practical examples and patterns for 1D/2D kernels, tiling, and shared memory.
  • Use Case: A Mojo developer porting a CUDA kernel to run on NVIDIA, AMD, or Apple GPUs with correct parallelism.

Quick Start

Provide a minimal Mojo 1D kernel template that copies input to output.

Frequently Asked Questions about mojo-gpu-fundamentals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I port CUDA kernels to Mojo for cross-platform GPU programming?

To port CUDA kernels to Mojo for GPU programming, map CUDA concepts to Mojo equivalents using kernel definitions and TileTensor abstractions. This enables portable parallel code execution across NVIDIA, AMD, and Apple GPUs without relying on CUDA syntax.

What is the Mojo equivalent of CUDA shared memory and synchronization primitives?

Mojo equivalents for CUDA shared memory and synchronization involve using Mojo's GPU primitives and TileTensor abstractions. These provide structured patterns for tiling and managing shared memory within 1D and 2D kernels.

Does Mojo GPU programming support running kernels on AMD and Apple GPUs?

Mojo GPU programming supports running kernels on AMD and Apple GPUs. By replacing CUDA-centric notions with standard Mojo GPU primitives, developers can write portable code that executes correctly across these different hardware platforms.

How do I write a 1D Mojo kernel template for basic GPU operations?

You write a 1D Mojo kernel template by utilizing Mojo's kernel definitions to copy input buffers to output. This minimal template establishes the foundational parallel structure for more complex GPU porting scenarios.

What is the best way to manage memory and tiling in Mojo GPU kernels?

The best way to manage memory and tiling in Mojo GPU kernels is through TileTensor abstractions. They offer practical examples and patterns for handling 2D kernels and shared memory, translating complex CUDA memory concepts into portable Mojo code.