ascend-npu-analyze-round-performance
Use when an optimize round needs deep performance diagnosis from round-local profile and optional IR evidence, especially to explain scalar/vector/cube imbalance, frequent data movement, weak pipeline overlap, or other signals that should be traced back to problems in the current operator implementation.
- License 许可
- Apache-2.0
- 所属仓库
- Piagari/helix
- 最近更新
- 2026-07-16
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ascend-npu-analyze-round-performance
- description
- Use when an optimize round needs deep performance diagnosis from round-local profile and optional IR evidence, especially to explain scalar/vector/cube imbalance, frequent data movement, weak pipeline overlap, or other signals that should be traced back to problems in the current operator implementation.
02 资源文件 3
03 SKILL.md 正文
Analyze Optimize Round Performance
Diagnose one opt-round-N/ at a time and write the result to opt-round-N/perf-analysis.md.
This skill is for deep round analysis inside the corresponding <Language>-npu-optimize skill, not for supervisor audits and not for whole-session summaries.
This skill is the owner of opt-round-N/perf-analysis.md for round-level performance diagnosis inside the corresponding <Language>-npu-optimize skill.
In file paths below, <Language> is triton or tilelang depending on the kernel language of the current optimize session.
It supports both:
profile-only diagnosisprofile-plus-IR diagnosis
When IR attribution is needed, use the corresponding <Language>-npu-analyze-ir skill as the IR evidence companion for capture, navigation, and stage-level inspection. That does not transfer ownership of opt-round-N/perf-analysis.md.
Use two complementary analysis paths to find performance problems:
- profiling analysis to identify where time is going and which hardware-facing symptom dominates
- IR analysis to explain why that symptom appears in the current lowering and operator structure
Use profiler-first layered analysis. Start from profiler evidence, deepen into .bin when the CSV-level view is not enough, and use IR as explanation and attribution rather than as the default entrypoint.
When compiler source analysis is enabled by the launch prompt or workspace guidance, treat it as a later escalation after profile and IR analysis. Use the corresponding <Language>-npu-analyze-compiler-source skill only when this skill has narrowed the problem to a concrete performance-related compiler-side question that still needs source-backed explanation before the next operator change is clear.
Read references/ascend-npu-profiling-analysis.md when the round needs deeper interpretation of op_summary, task_time, api_statistic, msprof JSON, or .bin signals.
Read references/ascend-npu-optimization-guidance.md when you need help turning profiling symptoms and IR findings into concrete potential optimization points.
Read references/ascend-npu-architecture-notes.md when the likely optimization point depends on chip differences such as A3 versus A5 buffer sizes, layout behavior, or cube/vector data handoff.
Use the staged <Language>-npu-optimize-knowledge skill when structured profile or IR evidence is available and you need Triton/kernel-oriented symptom cards to narrow likely pattern directions before returning to detailed pattern references. Start from that skill's references/symptom_index.md.
When the optimize target is operator and the evidence points to Torch NPU or framework-op behavior, also use the staged torch-npu-optimize-knowledge skill and start from its references/pattern_index.md for operator-level pattern routing.
Read the references in this order:
- profiling analysis, to understand the dominant profiler signals
- optimization guidance, to turn those signals plus IR findings into potential optimization points
- architecture notes, to adjust those optimization points for chip-specific constraints when needed
Default workflow
- Resolve the current round directory and round-local operator file.
- Confirm the round has profile evidence.
- Prefer round-local evidence such as
opt-round-N/profile/. - If profile evidence is missing, collect it first through the
ascend-npu-profile-operatorskill.
- Prefer round-local evidence such as
- Strongly consider spawning a subagent before the deep analysis phase.
- Use this when profile or IR artifacts are large, or when the round already has a long
attempts.md. - If context is still small enough, the current agent may continue directly.
- Use this when profile or IR artifacts are large, or when the round already has a long
- Extract profile signals first.
- Prefer the
ascend-npu-run-evalskill'sprofile-reporthelper in JSON mode. The standard argument shape is:profile-report --profile-dir <profile-dir> --format json - Use this as the default structured entrypoint for profiling evidence.
- Prefer the
- Interpret profiling evidence through the profiling reference instead of ad hoc guesses.
- Follow references/ascend-npu-profiling-analysis.md for layered signal interpretation.
- Escalate into
.binwhen CSV-level evidence is still not explanatory enough.
- Use the staged
<Language>-npu-optimize-knowledgeskill'sreferences/symptom_index.mdand the matching symptom cards to narrow the current hypothesis.- Start from that symptom index, then read only the one or two best-matching cards under the staged
<Language>-npu-optimize-knowledgeskill'sreferences/symptoms/directory. - When the optimize target is
operatorand the bottleneck looks Torch NPU or framework-op specific, also use the stagedtorch-npu-optimize-knowledgeskill'sreferences/pattern_index.mdand the one or two best-matching cards under itsreferences/patterns/directory. - Use symptom cards as routing aids, not as a replacement for the underlying profile or IR evidence.
- Start from that symptom index, then read only the one or two best-matching cards under the staged
- Decide whether profiler evidence is already sufficient on its own.
- If the layered profiler signals already explain the likely operator problem well enough, continue to diagnosis.
- If the profiler signals are suspicious but still not explanatory enough, capture or reuse IR under
opt-round-N/ir/.
- Extract IR performance signals as the second analysis path for explanation and attribution.
- Prefer the
ascend-npu-analyze-irskill'sinspect_ir.pyhelper inperformance-signalsmode:inspect_ir.py performance-signals --ir-dir <ir-dir> --format json - Use
list-stages,stage-summary,find-changes, or direct file inspection when the heuristic summary points to a specific stage or lowering symptom.
- Prefer the
- Compare with parent or baseline evidence when it already exists and is useful.
- Do not block the round analysis if comparable evidence is missing.
- Record missing comparison inputs as an evidence gap rather than guessing.
- Write
opt-round-N/perf-analysis.md.
- Either
profile-only diagnosisorprofile-plus-IR diagnosisis acceptable, as long as the document makes the evidence path clear.
Output contract
Write the analysis as a standalone document with these sections:
# Round Performance Analysis## Executive Summary## Profile Signals## Binary Signals## IR Signals## Diagnosis## Operator Implementation Issues## Optimization Suggestions## Evidence Gaps
Inside ## Profile Signals, prefer these subsections when the evidence exists:
### Hotspots### Pipeline Ratios### Timeline And Wait### Host API Overhead
Inside ## Diagnosis, prefer these subsections:
### Operator Type Fit### Compute vs Memory Bound### Pipeline Bottlenecks### Memory Hierarchy Bottlenecks### Concurrency And Scheduling Bottlenecks
Required reasoning rules
- Treat profile evidence as the default required input.
- Treat
.binas a first-class deep-analysis path, not only as a niche fallback. - Treat IR as optional but strongly preferred when profiler evidence alone does not explain the likely implementation problem.
- Use IR as explanation and attribution for profiler symptoms, not as the default entrypoint.
- Use profiling analysis and IR analysis together when one source alone cannot explain the performance problem confidently.
- Keep artifact ownership here even when IR evidence is used; the corresponding
<Language>-npu-analyze-irskill is the IR evidence companion, not the owner ofperf-analysis.md. - Distinguish facts from inference.
- Cite the specific profile path, IR path, stage name, or operator name that supports each nontrivial conclusion.
- Do not stop at profiler or IR symptoms. The final diagnosis must point to likely problems in the current operator implementation.
- Keep optimization suggestions tied to those diagnosed implementation problems.
- Do not automatically write the analysis back into
attempts.mdorsummary.md.perf-analysis.mdis the formal output of this skill.
Use the profiling and optimization references for detailed signal interpretation and for mapping those signals to likely optimization points. Keep SKILL.md focused on workflow, evidence order, and output quality.
04 同仓库更多 Skills
triton-npu-repair-guide
Heuristic fixes for Ascend Triton compile/JIT/kernel errors and numerical precision mismatches when editing or converting the operator. Does not replace ascend-npu-gen-test, ascend-npu-gen-bench, or harness specs.
triton-npu-optimize
Iteratively optimize a Triton Ascend NPU operator with correctness and performance gates. Use for operator optimization tasks that need repeated correctness validation, benchmark validation, multi-round experiment tracking, reusable optimization notes, and profiler-backed performance analysis when benchmark results need deeper explanation.
triton-npu-optimize-knowledge
Generic reference-only optimize knowledge for pattern triage and evidence-backed symptom routing. This skill does not define optimize workflow or own round artifacts.
triton-npu-optimize-knowledge-v3
Generic reference-only optimize knowledge (v3 working copy) for pattern triage and evidence-backed symptom routing. This skill does not define optimize workflow or own round artifacts; prefer this tree for ongoing knowledge updates.
triton-npu-optimize-knowledge
Generic reference-only optimize knowledge for pattern triage and evidence-backed symptom routing. This skill does not define optimize workflow or own round artifacts.
triton-npu-convert-pytorch-operator
Convert one PyTorch operator into a Triton NPU-backed PyTorch operator, preserve the trailing input-helper block, and validate the converted output through standalone or differential testing.