Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

llm-torch-profiler-analysis

Skill by sgl-project

Triages torch.profiler traces from sglang, vllm, TensorRT-LLM and TokenSpeed. It returns one three-table report covering kernels, overlap opportunities and fuse patterns.

  • Score 94
  • 39k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install llm-torch-profiler-analysis

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sgl-project/sglang /tmp/sglang && mkdir -p ~/.claude/skills && cp -r /tmp/sglang/.agents/skills/llm-torch-profiler-analysis ~/.claude/skills/llm-torch-profiler-analysis

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install llm-torch-profiler-analysis in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill analyzes torch.profiler output from sglang, vllm, TensorRT-LLM and TokenSpeed. It can inspect an existing trace.json(.gz) or profile directory. For some servers it can also drive live profiling through the server's profiler endpoints. The main workflow, triage, always prints three tables: kernel, overlap-opportunity and fuse-pattern. By default rows appear only at or above 1.0% cumulative GPU-time share.

Live capture defaults to two labeled workloads, prefill and decode, with 10 warmup steps and 5 active steps. The fuse-pattern table is kept source-backed and deterministic rather than fuzzy. The source states that it is meant for analyzing LLM serving performance and comparing kernel behavior across frameworks.

Written from the project's SKILL.md and checked against it.

What it can do

  • triageRenders kernel, overlap-opportunity and fuse-pattern tables from a torch.profiler trace.
  • Existing trace analysisInspects an existing trace.json(.gz) or profile directory from supported frameworks.
  • Live profilingDrives profiling against a running server when its profiler endpoints are available.
  • Markdown bundle renderingGroups validated analysis results by model into one markdown document.

What you need

  • Python 3
  • Access to a torch.profiler trace or a running server with profiler endpoints
  • A writable shared trace directory for TensorRT-LLM live capture

Try asking

  • Analyze this trace.json.gz from my vLLM run and show the three tables.
  • Profile my running SGLang server with the stage-separated prefill and decode workloads.
  • Check the TokenSpeed profile directory for kernels above 1% GPU time.

Good to know

  • TensorRT-LLM live capture needs /start_profile and /stop_profile endpoints and a shared trace path.
  • vLLM live capture requires output-dir to match the server torch_profiler_dir.
  • For diffusion work, traces from the diffusers fallback backend are rejected.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/llm-torch-profiler-analysis/SKILL.md, .agents/skills/llm-torch-profiler-analysis/scripts/analyze_llm_torch_profile.py, .agents/skills/llm-torch-profiler-analysis/scripts/analyze_sglang_torch_profile.py, .agents/skills/llm-torch-profiler-analysis/scripts/make_trtllm_py_executor_override.py, .agents/skills/llm-torch-profiler-analysis/scripts/probe_llm_server.py, .agents/skills/llm-torch-profiler-analysis/scripts/profile_common.py, .agents/skills/llm-torch-profiler-analysis/scripts/render_triage_markdown_bundle.py, .agents/skills/llm-torch-profiler-analysis/scripts/run_llm_single_model_matrix_host.sh, .agents/skills/llm-torch-profiler-analysis/scripts/run_sglang_torch_profile_host.sh. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md25 KB
  • references/fuse-overlap-catalog.md93 KB
  • references/heuristics.md4 KB
  • references/overlap-catalog.md24 KB
  • references/source-map.md1 KB
Show all 18 files
  • references/vllm-torch-compile-fusions.md8 KB
  • scripts/analyze_llm_torch_profile.py31 KB
  • scripts/analyze_sglang_torch_profile.py506 B
  • scripts/make_trtllm_py_executor_override.py4 KB
  • scripts/probe_llm_server.py7 KB
  • scripts/profile_common.py40 KB
  • scripts/render_triage_markdown_bundle.py8 KB
  • scripts/run_llm_single_model_matrix_host.sh9 KB
  • scripts/run_sglang_torch_profile_host.sh7 KB
  • scripts/run_trtllm_pytorch_profile_host.sh11 KB
  • scripts/run_vllm_torch_profile_host.sh9 KB
  • scripts/triage_kernel_helpers.py92 KB
  • scripts/triage_overlap_helpers.py56 KB

Alternatives to llm-torch-profiler-analysis

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

llm-torch-profiler-analysis: common questions

Which frameworks does this skill analyze?

The source says it covers sglang, vllm, TensorRT-LLM and TokenSpeed. Live capture support differs by framework.

Can it analyze a trace I already have?

Yes. The source says it can inspect an existing trace.json(.gz) or profile directory for all four frameworks.

What does the fuse-pattern table show?

The source describes it as a source-backed, deterministic table of fusion patterns, not a fuzzy matcher.

How do I install llm-torch-profiler-analysis?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is llm-torch-profiler-analysis free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is llm-torch-profiler-analysis safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to llm-torch-profiler-analysis?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

llm-torch-profiler-analysis Install

Add to stack

Loading.