debug-cuda-crash

Log CUDA kernel API calls and inputs to diagnose SGLang crashes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables debugging CUDA crashes in SGLang by capturing kernel API call data and input tensors before a crash to preserve debugging context and reproduce failures.

Core Features & Use Cases

  • Kernel API logging: records function boundaries, inputs, and optional metadata to diagnose failures.
  • Crash-safe dumps & multi-process support: preserves inputs/metadata even when a crash occurs, across ranks/processes.
  • Use Case: when a CUDA device-side assertion occurs during a diffusion or LLM workload, you can inspect the logs to locate invalid inputs or misaligned tensors.

Quick Start

Enable kernel API logging at Level 3 or higher and run your script to reproduce and inspect CUDA crashes.

Frequently Asked Questions about debug-cuda-crash

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

FAQPage Schema
How do I diagnose a CUDA device-side assertion crash in SGLang?

To diagnose a CUDA crash in SGLang, enable kernel API logging at Level 3 or higher to record function boundaries and inputs. This captures invalid inputs or misaligned tensors before the failure.

What is kernel API logging for CUDA crash diagnostics?

Kernel API logging records function boundaries, input tensors, and optional metadata to preserve debugging context. It identifies invalid inputs or misaligned tensors causing CUDA device-side assertions during workloads.

Can I filter kernel API calls to isolate specific CUDA crashes?

Optional API filtering allows you to isolate specific kernel calls during CUDA crash diagnostics. Combined with configurable log destinations and dump directories, this enables reproducible debugging across processes.

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

Kernel API logging handles both LLM and diffusion workloads in SGLang. It captures input and output metadata to locate invalid inputs causing CUDA device-side assertions across these different model types.

How do I preserve debugging context when a CUDA crash destroys logs?

Crash-safe dumps preserve debugging context by writing kernel API inputs and metadata to configured dump directories before the crash. This ensures multi-process logs survive for inspecting invalid tensors.