debug-cuda-crash

Log CUDA kernel API calls and tensor metadata around crash boundaries in SGLang.

410|14|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/OpenMOSS/MOSS-VL --skill debug-cuda-crash-openmoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-cuda-crash
Source: https://github.com/OpenMOSS/MOSS-VL/tree/main/sglang/.claude/skills/debug-cuda-crash
Command: npx skills add https://github.com/OpenMOSS/MOSS-VL --skill debug-cuda-crash-openmoss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers diagnose CUDA crashes in SGLang by enabling kernel API logging to capture inputs, outputs, and tensor metadata around the crash boundary.

Core Features & Use Cases

  • Enable multi-level kernel API logging (levels 1, 3, 5, and 10) to observe function boundaries and capture contextual data before failures.
  • Record tensor shapes, dtypes, and runtime statistics at each boundary to trace data flow into crashing kernels.
  • Support crash-dump workflows for multi-GPU runs with configurable include/exclude filters and per-process log paths.

Quick Start

Run the provided crash-debug script with SGLANG_KERNEL_API_LOGLEVEL=3 to capture tensor metadata around the crash.

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 illegal memory access and device-side asserts in SGLang?

Debug CUDA crashes by enabling kernel API logging in SGLang to capture inputs, outputs, and tensor metadata around the crash boundary, isolating illegal memory access and device-side asserts.

Can I trace NaN and Inf issues in multi-GPU LLM and diffusion workloads?

Trace NaN and Inf issues in multi-GPU LLM and diffusion workloads by applying kernel API logging with configurable include/exclude filters and per-process log paths to capture tensor metadata.

What SGLANG_KERNEL_API_LOGLEVEL value do I need to capture tensor metadata?

Set SGLANG_KERNEL_API_LOGLEVEL to 3 to capture tensor metadata around the crash boundary, while higher levels like 5 and 10 observe more detailed function boundaries and contextual data.

Does kernel API logging support filtering specific API calls during crash diagnostics?

Kernel API logging supports API filtering with configurable include/exclude filters, allowing you to tailor the collected data and focus on specific API calls during crash diagnostics.

What is the best way to record tensor shapes and dtypes before a CUDA kernel failure?

Record tensor shapes and dtypes before a CUDA kernel failure by enabling multi-level kernel API logging, which traces data flow into crashing kernels by capturing runtime statistics.