llm-torch-profiler-analysis

Analyze torch.profiler traces to generate kernel, overlap, and fuse-pattern tables.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Torch-based profiling across multiple LLM backends is complex due to divergent trace formats and analysis tasks. This Skill provides a unified workflow to triage torch.profiler outputs from SGLang, vLLM, and TensorRT-LLM into actionable three-table reports that summarize kernel activity, overlap opportunities, and fusion patterns.

Core Features & Use Cases

  • Unified triage across SGLang, vLLM, and TensorRT-LLM with support for single-trace and two-trace workflows.
  • Generates kernel, overlap-opportunity, and fuse-pattern tables to help diagnose bottlenecks and identify optimizations.
  • Useful for post-hoc analysis of traces or live profiling against a running LLM server to compare frameworks and backends.

Quick Start

Run analyze_llm_torch_profile.py against a local trace or start a live profiling session against a running LLM server to produce the triage report.

Frequently Asked Questions about llm-torch-profiler-analysis

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

FAQPage Schema
How do I analyze torch profiler traces for LLM performance bottlenecks?

Yes, vLLM is fully supported alongside SGLang and TensorRT-LLM. The skill provides a unified triage workflow to analyze torch profiler traces from these engines, allowing you to compare frameworks and identify backend-specific performance bottlenecks.

Can I run live profiling against a running vLLM or SGLang server?

Yes, you can run live profiling against a running vLLM or SGLang server. The skill supports both post-hoc analysis of local trace files and live profiling sessions to generate kernel activity, overlap opportunity, and fuse pattern reports.

What is the best way to identify kernel fusion opportunities from torch profiler output?

The best way to identify kernel fusion opportunities is to generate the skill's fuse-pattern table. It analyzes torch profiler traces to highlight potential fusion opportunities, helping you diagnose and optimize computational bottlenecks across LLM engines.

How do I diagnose overlap opportunities in TensorRT-LLM traces?

To diagnose overlap opportunities in TensorRT-LLM traces, the skill generates a structured overlap-opportunity table from your torch profiler output. This table highlights areas where kernel execution can be concurrent, directly guiding your optimization efforts.