sglang-torch-profiler-analysis

Analyze SGLang torch-profiler traces to identify dominant GPU kernels and fusion patterns.

556|81|Updated May 19, 2026
One-click install
npx skills add https://github.com/FutureMLS-Lab/OSCAR --skill sglang-torch-profiler-analysis-futuremls-lab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sglang-torch-profiler-analysis
Source: https://github.com/FutureMLS-Lab/OSCAR/tree/main/sglang-research/.claude/skills/sglang-torch-profiler-analysis
Command: npx skills add https://github.com/FutureMLS-Lab/OSCAR --skill sglang-torch-profiler-analysis-futuremls-lab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill turns SGLang torch.profiler traces or live-server profiles into a compact diagnosis of dominant kernels, missed overlap opportunities, and recognizable fusion patterns.

Core Features & Use Cases

  • Kernel Triage: Identify GPU kernels that dominate prefill, decode, or extend stages and map them to CPU operations and Python source locations.
  • Overlap Analysis: Compare graph-off mapping traces with formal graph-on traces to assess hidden work, dependency risk, and practical overlap headroom.
  • Fusion Pattern Detection: Match trace evidence against source-backed SGLang, FlashInfer, diffusion, MoE, attention, and upstream optimization catalogs before labeling an opportunity as novel.
  • Live or Offline Workflows: Analyze existing trace files and profile directories or trigger profiling against a running SGLang server, including stage-specific profiling.
  • Use Case: When a decode benchmark shows unexpectedly low throughput, use this Skill to determine whether attention, communication, metadata preparation, or MoE kernels dominate and whether an existing fusion or overlap path is disabled.

Quick Start

Use the SGLang torch-profiler analysis skill to triage the profile at the specified trace or profile-directory path and return the compact kernel, overlap-opportunity, and fuse-pattern report.

Frequently Asked Questions about sglang-torch-profiler-analysis

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

FAQPage Schema
How do I identify dominant GPU kernels in an SGLang torch profiler trace?

To identify dominant GPU kernels in an SGLang torch profiler trace, you can analyze the trace to triage prefill, decode, or extend stages, mapping GPU kernels to CPU operations and Python source locations for bottleneck diagnosis.

What is the best way to find kernel fusion opportunities in SGLang profiles?

Finding kernel fusion opportunities in SGLang profiles involves matching trace evidence against source-backed SGLang, FlashInfer, diffusion, MoE, and attention optimization catalogs before labeling an opportunity as novel.

Can I profile a live SGLang server for stage-specific performance triage?

Yes, you can trigger profiling against a running SGLang server for stage-specific performance triage, or apply the workflow offline to existing trace files and profile directories to capture prefill or decode workloads.

How does overlap analysis work when comparing graph-off and graph-on mapping traces?

Overlap analysis compares graph-off mapping traces with formal graph-on traces to assess hidden work, dependency risk, and practical overlap headroom, requiring conservative single-trace or mapping-and-formal two-trace analysis.

Why does my SGLang decode benchmark show unexpectedly low throughput?

If an SGLang decode benchmark shows unexpectedly low throughput, trace analysis can determine whether attention, communication, metadata preparation, or MoE kernels dominate and whether an existing fusion or overlap path is disabled.

Are there limitations to analyzing torch profiler traces for SGLang workloads?

Analysis of SGLang torch profiler traces requires backend validation before recommending optimizations, and demands conservative single-trace or formal two-trace analysis to properly assess dependency risks across disaggregated workloads.