Token导航 LogoToken导航

Agent Skill · 开发

sglang-torch-profiler-analysis(sglang torch profiler 分析)

sglang-torch-profiler-analysis 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

sglang-torch-profiler-analysis 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 18,049。

总安装 364周安装 15GitHub Stars 143下载 119核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sglang-torch-profiler-analysis(sglang torch profiler 分析)
来源仓库:https://github.com/bbuf/sglang-auto-driven-skills
仓库路径:skills/sglang-torch-profiler-analysis
安装命令:
npx skills add https://github.com/bbuf/sglang-auto-driven-skills --skill sglang-torch-profiler-analysis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bbuf/sglang-auto-driven-skills --skill sglang-torch-profiler-analysis

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

sglang-torch-profiler-analysis 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

适用于分析 sglang 与 PyTorch 集成的性能瓶颈,如推理延迟或内存占用问题。通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。

可结合来源仓库和 SKILL.md 继续核验功能细节,确保与项目需求匹配。

来源仓库内路径:skills/sglang-torch-profiler-analysis

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bbuf/sglang-auto-driven-skills --skill sglang-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

sglang-torch-profiler-analysis 怎么安装?

在终端执行 npx skills add https://github.com/bbuf/sglang-auto-driven-skills --skill sglang-torch-prof…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

sglang-torch-profiler-analysis 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

sglang-torch-profiler-analysis 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

sglang-torch-profiler-analysis 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

sglang-torch-profiler-analysis 用的人多吗?

公开数据是累计安装 364 次,近一周安装 15 次,下载 119 次,GitHub 143 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

sglang-torch-profiler-analysis 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
sglang-torch-profiler-analysis

sglang torch profiler 分析 · 本页

364143需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

SGLang Torch Profiler Analysis

Overview

Use this skill for SGLang torch.profiler analysis.

There is only one public workflow:

  • triage

Use the unified entrypoint:

triage always prints the same three tables:

  • kernel table
  • overlap-opportunity table
  • fuse-pattern table

By default, all three tables only render rows at or above 1.0% cumulative GPU-time share. Treat anything below that as noise unless the user explicitly asks for a lower cutoff.

The script-level fuse-pattern table should stay source-backed and deterministic. Do not build a fuzzy string-matching engine into the script for typo-tolerance.

If exact/source-backed matching is weak but the agent judges that a cluster of kernels still looks semantically close to a known pattern, add a short AI note after the table with one of these labels:

  • high: very likely the same pattern family; naming drift or minor implementation reshaping is the main uncertainty
  • medium: several signals line up, but one important piece is still ambiguous
  • low: weak resemblance only; mention it only if it is still worth a human follow-up

When To Use It

  • inspect an SGLang torch profiler trace or profile directory
  • profile a live SGLang server and immediately analyze the output
  • summarize which kernel families dominate prefill or decode
  • map kernels back to Python code paths
  • judge whether a code path still has overlap headroom
  • check whether an already-known fusion or overlap path should have applied

Diffusion Backend Gate

For diffusion benchmark or profiling work, only analyze traces produced by the native SGLang diffusion backend.

If the run that generated the trace logs any of:

  • Falling back to diffusers backend
  • Using diffusers backend
  • Loaded diffusers pipeline

stop the workflow instead of analyzing the trace. Treat it as a backend-selection issue, not as valid SGLang diffusion profiler evidence.

Main Flows

1. Single-trace triage from an existing profile dir or trace

python3 scripts/analyze_sglang_torch_profile.py \
  --input /path/to/profile_dir_or_trace.json.gz

Use this when you want the fastest read on kernel share and likely fused-kernel pattern matches. The overlap table stays conservative in single-trace mode and will tell you when a mapping/formal pair is needed.

2. Single-trace triage from a running server

python3 scripts/analyze_sglang_torch_profile.py \
  --url http://127.0.0.1:30000 \
  --num-steps 5 \
  --profile-by-stage

3. Two-trace triage from existing profile dirs or traces

python3 scripts/analyze_sglang_torch_profile.py triage \
  --mapping-input /path/to/graph_off_profile_dir \
  --formal-input /path/to/graph_on_profile_dir

Use this when you need stronger overlap conclusions and cleaner kernel-to-source attribution.

4. Two-trace triage from running servers

python3 scripts/analyze_sglang_torch_profile.py triage \
  --mapping-url http://127.0.0.1:31025 \
  --formal-url http://127.0.0.1:31026 \
  --num-steps 5 \
  --profile-by-stage

profile_by_stage

profile_by_stage is not only for PD disaggregation.

  • On ordinary non-PD serving, it is still useful because prefill and decode usually have very different bottlenecks.
  • On the current profile-v2 path inside SGLang, stage-based profiling is effectively the normal path.
  • PD-disaggregated serving adds one extra rule: prefill workers and decode workers must be profiled separately. That is stricter than ordinary profile_by_stage.

How To Choose The Triage Shape

Single-trace triage

Use when you want the lowest-friction report:

  • one trace is already available
  • you mainly want kernel share and fusion clues
  • you are comparing two runs side by side by running triage once per trace

This is the recommended default.

Two-trace triage

Use when you need:

  • a stronger answer about overlap headroom
  • graph-off source mapping plus graph-on final behavior
  • more trustworthy overlap recommendations in the middle table
  1. mapping trace with --disable-cuda-graph --disable-piecewise-cuda-graph
  2. formal trace with the real serving optimizations enabled

Do not call the mapping pass a "fast profile". It exists to recover kernel -> cpu_op -> python scope.

Workflow

Single-trace workflow

  1. If the user only wants a quick diagnosis, one trace is enough.
  2. Prefer rank-local TP-0 traces over merged traces.
  3. For a live server, this skill can call sglang.profiler and automatically send a small probe request.
  4. Prefer --profile-by-stage even on standard serving unless the user explicitly wants an all-stage mixed trace.

Two-trace workflow

  1. Produce a mapping trace first with graph disabled.
  2. Produce a formal trace second with graph enabled and the real serving flags kept on.
  3. Run triage for the compact three-table report.
  4. Read the results in this order:

- kernel table - overlap-opportunity table - fuse-pattern table

  1. Before calling something a "new" optimization idea, compare the top rows against both references/fuse-overlap-catalog.md and references/overlap-catalog.md. Check mainline rows first, then the PR-backed / in-flight sections for still-moving upstream work. Prefer reporting:

- an existing fused or overlap path that should already apply here - an existing path that appears disabled, unsupported, or regressed in this trace - an upstream pattern that is mainline elsewhere but missing locally, or still open upstream - a truly new opportunity only when no catalog entry fits

  1. If no exact pattern fully matches but the trace still looks semantically close to a known family, add one flat AI similarity judgment note after the tables. Use high, medium, or low only. Base that note on the full pattern shape, not on one kernel name alone. Prefer semantic cues such as producer-consumer chain, source locations, CPU op names, TP context, and model-specific structure. Do not rewrite the script table itself to include these heuristic judgments.

References

Load these only when needed:

- upstream SGLang profiler entrypoints and trace-writing source paths

- overlap labels, dependency-risk interpretation, and limits

- mixed source-backed catalog of existing fuse and overlap patterns, including mainline rows plus PR-backed / in-flight rows

- overlap-only lookup table across LLM, VLM, diffusion, disaggregation, HiSparse, and speculative scheduling

Output Contract

Return:

  • trace path or generated profile path
  • model/server args when available
  • kernel table
  • overlap-opportunity table
  • fuse-pattern table
  • optional AI similarity judgment note with high / medium / low when exact matching is inconclusive
  • one short conclusion about what dominates the run
  • whether the overlap conclusion came from single-trace triage or mapping/formal two-trace triage

平台分布

Codex

35.75%
按下载量换算43

Claude

27.29%
按下载量换算32

Cursor

18.16%
按下载量换算22

Gemini CLI

8.99%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills