perf-analyzer

Analyze PyPTO operator performance metrics from bubble analysis logs and generate rating reports.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill perf-analyzer-wangwindow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-analyzer
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/pypto-op-perf-tune/perf-analyzer
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill perf-analyzer-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? It turns raw PyPTO operator performance data (bubble_analysis.log, swimlane JSON, runtime traces) into actionable metrics, ratings, and bottleneck diagnoses, removing the need to manually parse profiling logs on Ascend NPU runs. ## Core Features & Use Cases - Automated Metric Extraction: Parses bubble_analysis.log to compute AicoreTime, core utilization, bubble rate, and load balance for AIC and AIV cores. - Performance Rating & Bottleneck Analysis: Assigns star ratings against thresholds and identifies issues such as high bubble rate, low utilization, and uneven core load. - Optimization Guidance: Generates a structured Markdown report with prioritized tuning suggestions and pointers to follow-up tuning skills (tune-frontend, tune-swimlane, tune-incore). - Use Case: After running a PyPTO operator with runtime debug mode enabled, point the analyzer at the output directory to get a full performance report with ratings and next-step tuning directions. ## Quick Start Ask the assistant to analyze the PyPTO operator performance data in your output directory and generate a performance report with bottleneck analysis.

Frequently Asked Questions about perf-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze PyPTO operator performance data?

Run the analyze_perf.py script with the output directory containing bubble_analysis.log as its argument. The script parses core metrics, computes utilization and bubble rate, and writes a performance_analysis_report.md into the same directory.

What is bubble rate in PyPTO performance analysis?

Bubble rate is the wait schedule time divided by the sum of AicoreTime and wait schedule time, expressed as a percentage. A bubble rate above 20% indicates heavy scheduling waits, often caused by small task granularity or poor scheduling strategy.

Where is the bubble_analysis.log file located?

It is generated under output/output_<timestamp>/ relative to the working directory where the operator was executed with runtime debug mode enabled. If unsure, run find . -name bubble_analysis.log from the project root to locate it.

How is core utilization calculated for AIC and AIV cores?

Core utilization equals AicoreTime divided by AicoreTime plus total wait time, where AicoreTime is total work time minus total wait time. Utilization above 90% earns a five-star rating; below 50% is rated one star.

Why does the performance analysis script fail to find my log?

The script fails when the operator was not run with runtime_debug_mode enabled or when the wrong directory is passed. Pass the timestamped output directory directly, or let the script recursively search subdirectories for bubble_analysis.log.

What should I do after getting the performance report?

Follow the tuning direction section of the report: start with frontend tuning for low utilization, then swimlane-based deep tuning for high bubble rates, and finally in-core tuning. Each direction maps to a dedicated tuning skill such as tune-frontend or tune-swimlane.