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.
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-analysisRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install llm-torch-profiler-analysis in Claude Code
git clone --depth 1 https://github.com/sgl-project/sglang /tmp/sglang && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sglang/.agents/skills/llm-torch-profiler-analysis ~/.gemini/antigravity-cli/skills/llm-torch-profiler-analysisAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install llm-torch-profiler-analysis in Antigravity CLI
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
ANo 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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
