debug-cuda-crash

Diagnose CUDA crashes in SGLang by logging tensors at kernel API boundaries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps diagnose difficult CUDA crashes in SGLang by capturing the tensor inputs, metadata, and execution context at kernel API boundaries before failures prevent normal debugging.

Core Features & Use Cases

  • Crash-Safe Kernel Logging: Configure SGLang kernel API logging from function names through detailed tensor statistics and pre-execution dumps.
  • LLM and Diffusion Coverage: Investigate custom operations, attention, linear, quantization, rotary, and model-specific kernel paths across SGLang workloads.
  • Failure Isolation: Correlate shapes, dtypes, devices, strides, NaN or Inf values, multi-process logs, and sanitizer output to identify illegal memory access, device-side assert, out-of-memory, and numerical failures.
  • Use Case: When a multi-GPU SGLang inference job crashes with an illegal memory access, capture per-process level-10 inputs, identify the final failing API boundary, and compare its tensor metadata with compute-sanitizer results.

Quick Start

Use the debug-cuda-crash skill to reproduce the SGLang CUDA failure with level-3 logging first, then escalate to level-10 crash-safe input dumps if the failing kernel remains unclear.

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 an illegal memory access in SGLang inference?

To diagnose an illegal memory access in SGLang inference, you can configure kernel API logging to capture per-process level-10 tensor inputs and compare the metadata against compute-sanitizer results to isolate the failing API boundary.

What is the best way to debug a CUDA device-side assert in LLM inference?

Debugging a CUDA device-side assert in LLM inference involves recording tensor inputs and execution context at kernel API boundaries before the failure, correlating NaN or Inf values with multi-process logs to identify numerical failures.

Can I use compute-sanitizer with SGLang to find out-of-memory errors?

Yes, you can integrate compute-sanitizer with SGLang kernel API logging to capture tensor statistics and isolate out-of-memory errors by analyzing shapes, dtypes, and strides at the failing kernel boundary.

Does SGLang kernel logging support debugging multi-GPU diffusion workloads?

Yes, SGLang kernel logging supports debugging multi-GPU diffusion workloads by capturing execution context and tensor dumps across custom operations, attention, and quantization kernel paths before failures occur.

Why does my SGLang CUDA crash prevent normal debugging and how do I fix it?

Your SGLang CUDA crash prevents normal debugging because failures halt execution before context is available; fix this by starting with level-3 logging, then escalating to level-10 crash-safe input dumps to capture pre-execution tensors.