tilelang-cuda-basics

Write GPU kernels with TileLang CUDA using T.Kernel and built-in primitives.

258|48|Updated Jun 22, 2020
One-click install
npx skills add https://github.com/mindspore-ai/akg --skill tilelang-cuda-basics-mindspore-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tilelang-cuda-basics
Source: https://github.com/mindspore-ai/akg/tree/main/akg_agents/python/akg_agents/op/resources/skills/tilelang-cuda/guides/tilelang-cuda-basics
Command: npx skills add https://github.com/mindspore-ai/akg --skill tilelang-cuda-basics-mindspore-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TileLang CUDA basics provide a practical introduction to writing high-performance GPU kernels using a Python-like DSL, reducing the complexity of CUDA development and enabling productive kernel design.

Core Features & Use Cases

  • Core concepts: introduces TileLang CUDA, kernel structure, and the key programming patterns used for GPU kernels.
  • Memory and parallelism: covers grid and thread block configuration, shared and local memory usage, and parallel execution strategies.
  • Common patterns: presents elemental operations, matrix computations, macros, and typical best practices for performant kernels.

Quick Start

Run the tilelang-cuda-basics tutorial to compile and run a simple CUDA kernel.

Frequently Asked Questions about tilelang-cuda-basics

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

FAQPage Schema
How do I write high-performance GPU kernels using a Python-like DSL?

You can write high-performance GPU kernels using a Python-like DSL by leveraging TileLang CUDA to reduce development complexity and enable productive kernel design through standard patterns and built-in primitives.

What are the standard patterns for CUDA acceleration using TileLang?

Standard patterns for CUDA acceleration with TileLang include JIT decoration, T.Kernel usage, and built-in primitives like T.gemm and T.reduce, alongside grid and thread block configuration for parallel execution.

How does TileLang handle shared and local memory for parallel execution?

TileLang handles memory for parallel execution by allowing developers to configure grid and thread blocks, and by managing shared and local memory usage to optimize common GPU programming patterns.

Do I need prior CUDA knowledge to use TileLang for matrix computations?

Prior CUDA knowledge is helpful but not strictly required, as TileLang introduces core concepts, kernel structure, and elemental operations for matrix computations through a Python-like DSL.

Can I use built-in primitives for matrix computations and reductions in TileLang?

Yes, you can use built-in primitives like T.gemm for matrix computations and T.reduce for reductions within JIT-decorated T.Kernel structures to execute performant GPU kernels.

What is the best way to start compiling and running a simple TileLang CUDA kernel?

The best way to start is by running the tilelang-cuda-basics tutorial, which guides you through compiling and running a simple CUDA kernel to understand the foundational memory models and programming patterns.