debug-cuda-crash

Diagnoses CUDA crashes in SGLang via level-based kernel API logging and crash dumps.

Updated Jun 29, 2026
One-click install
npx skills add https://github.com/hey-kong/sglang --skill debug-cuda-crash-hey-kong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-cuda-crash
Source: https://github.com/hey-kong/sglang/tree/main/.claude/skills/debug-cuda-crash
Command: npx skills add https://github.com/hey-kong/sglang --skill debug-cuda-crash-hey-kong

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CUDA crashes in SGLang can be difficult to diagnose; kernel API logging helps capture the boundary between operations and the input tensors to aid debugging.

Core Features & Use Cases

  • Enable level-based kernel API logging to observe function boundaries and tensor metadata around crashes.
  • Produce crash-safe dumps at level-10 when the process fails, including inputs and metadata.
  • Apply to LLM and diffusion workloads to identify misaligned shapes or data that trigger device errors.

Quick Start

Enable kernel API logging and run your script to reproduce the crash and inspect the resulting log for kernel boundaries and tensor metadata.

Frequently Asked Questions about debug-cuda-crash

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

FAQPage Schema
How do I debug CUDA crashes in SGLang?

To debug CUDA crashes in SGLang, enable kernel API logging to capture kernel boundaries and tensor metadata, which helps pinpoint the exact operations causing device errors.

How do I configure SGLang environment variables to generate crash-safe dumps?

Set SGLANG_KERNEL_API_LOGLEVEL to 10 and define SGLANG_KERNEL_API_DUMP_DIR to generate crash-safe dumps containing inputs and metadata when the process fails.

Does kernel API logging work with both LLM and diffusion workloads?

Yes, kernel API logging applies to both LLM and diffusion workloads, helping you identify misaligned shapes or invalid data that trigger device errors.

Why does enabling kernel API logging help diagnose device errors?

Enabling kernel API logging captures the boundary between operations and the input tensors, allowing you to trace exactly which kernel execution triggered the failure.