kernel-debug

Diagnose TileLang GPU kernel correctness failures across configurations and shapes.

168|55|Updated Jun 3, 2025
One-click install
npx skills add https://github.com/tile-ai/TileOPs --skill kernel-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kernel-debug
Source: https://github.com/tile-ai/TileOPs/tree/main/.claude/skills/kernel-debug
Command: npx skills add https://github.com/tile-ai/TileOPs --skill kernel-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured SOP for diagnosing correctness failures in TileLang kernels, guiding engineers through triage signals, reproducibility checks, and wiki references to reduce debugging time.

Core Features & Use Cases

  • Triage workflow for TileLang kernel correctness failures across configurations, shapes, and autotune settings.
  • Guidance on distinguishing config-level from shape-level bugs and steps to reproduce, verify, and recover.
  • Use Case: A kernel yields unexpected max_err on one config; apply the SOP to isolate the offending path and validate with a reference.

Quick Start

Run the TileOps kernel debugging SOP on a failing kernel to triage errors by checking configurations, examining index formulas, and clearing the JIT cache.

Frequently Asked Questions about kernel-debug

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

FAQPage Schema
How do I debug TileLang GPU kernel correctness failures?

To debug TileLang GPU kernel failures, apply a structured SOP that runs tests across configurations, inspects index formulas and boundary handling, clears the JIT cache, and compares numerical paths like fp16 versus fp32.

Why does my TileLang kernel yield unexpected max_err on one configuration?

An unexpected max_err on one configuration often indicates a config-level issue. You can isolate the offending path by running tests across multiple shapes and autotuning states to distinguish the root cause.

How do I distinguish shape-level bugs from config-level issues in GPU kernels?

You distinguish shape-level bugs from config-level issues by applying the debugging SOP across multiple configurations and autotuning states, isolating whether the failure stems from explicit shapes or specific tuning parameters.

What steps should I follow to diagnose TileOps kernel failures?

To diagnose TileOps kernel failures, follow the SOP steps: run tests across explicit configs, inspect index formulas and boundary handling, clear the JIT cache, and compare numerical paths such as fp16 versus fp32.

Do I need to clear the JIT cache when debugging TileLang kernels?

Yes, clearing the JIT cache is a required SOP step when debugging TileLang kernels. It ensures reproducibility checks are accurate by removing stale compiled artifacts before re-running tests.

Can I compare fp16 and fp32 numerical paths to fix TileLang kernel bugs?

Yes, comparing fp16 versus fp32 numerical paths is a core SOP step to fix TileLang kernel bugs. This comparison identifies precision-related failures and guides targeted fixes by validating against a reference.