[tool] feat: add profile skill - #580
Draft
NancyFyong wants to merge 1 commit into
Draft
Conversation
Route a performance investigation to the right tool (nsys / torch.profiler / torch_memory / MFU / RL-Insight) and profile one lightweight step. Mirrors the router style of the existing skills and points at docs/perf/profiler.md as the authoritative config surface, filling the cross-cutting decisions it leaves implicit (which process owns each phase, plain vs + overrides, the V1 nsys caveat, and not hand-rolling profilers in adapter code). AI assistance (pi coding agent) was used for this change. Co-authored-by: pi coding agent Signed-off-by: NancyFyong <2742092809@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a new agent skill
profileunder.agents/skills/profile/SKILL.md.It is a router (same style as
add-pipeline/run-cpu-tests/self-review):it points at the authoritative
docs/perf/profiler.mdand fills only thecross-cutting decisions that guide leaves implicit — which tool answers which
question (
nsys/torch.profiler/torch_memory/ MFU / RL-Insight), why toprofile one lightweight step instead of a full run, which process owns each phase
(actor / rollout server / reward-model server / ref), the
key=valuevs+key=valueoverride rule, themain_diffusion_v1nsys caveat, and nothand-rolling profilers in adapter code. No code, config, or docs pages change.
Checklist Before Starting
[cfg] feat: support NPU profiling, which adds NPU profiling config code) or [doc] feat: add performance tuning guide entry point #487 ([doc] feat: add performance tuning guide entry point, a docs page). No PR adds aprofiling agent skill under
.agents/skills/.[{modules}] {type}: {description}([tool] feat: ...),matching the precedent set by
[tool] feat: add self-review skill([tool] feat: add self-review skill #518).Test
No code paths change, so there are no unit tests. Verified locally:
pre-commit run --files .agents/skills/profile/SKILL.md), includingGenerate and verify _generated_*.yaml(no config touched),Check docs Last updated info, andCheck license—SKILL.mdis correctly excluded from both, like theexisting skills.
PR_TITLE="[tool] feat: add profile skill" python tests/special_sanity/check_pr_title.py→ valid, modules['tool'], typefeat.docs/perf/profiler.md,docs/perf/diffusion_mfu.md,docs/start/rl_insight.md.API and Usage Example
Discovered by the agent harness the same way as the other skills (one
SKILL.mdper directory withname+descriptionfront matter). It triggerswhen a performance/profiling question comes up, e.g.:
Design & Code Changes
.agents/skills/profile/SKILL.md(front matter + a concise routingbody). Nothing else changes.
docs/perf/profiler.mdstays the singlesource of truth for the config surface and the six recipes; the skill only
adds tool-selection and the recurring traps.
Checklist Before Submitting
[{modules}] {type}: {description}title format.AI assistance was used for this change.