AS

ascend-profiling-analysis

Automates performance profiling analysis for models trained on Ascend NPUs.

Install

mkdir -p .claude/skills/ascend-profiling-analysis && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15606" && unzip -o skill.zip -d .claude/skills/ascend-profiling-analysis && rm skill.zip

Installs to .claude/skills/ascend-profiling-analysis

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Analyze Ascend NPU profiling data to identify training performance bottlenecks. Breaks down step-level time into compute, unoverlapped communication, and freetime; within compute, analyzes compute vs memory-bound ratios and cube vs vector utilization to summarize the model's performance bottleneck.
299 charsno explicit “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Analyze Ascend NPU profiling data
  • Identify training performance bottlenecks
  • Break down step-level time into compute, communication, and freetime
  • Analyze compute vs memory-bound ratios
  • Summarize cube vs vector utilization

How it works

This skill analyzes Ascend NPU profiling data by executing a Python script that breaks down step-level time into compute, communication, and freetime. It further analyzes compute vs memory-bound ratios and cube vs vector utilization to identify training performance bottlenecks.

Inputs & outputs

You give it
a profiling data root directory path
You get back
a detailed analysis of model performance bottlenecks, including step trace and kernel details

When to use ascend-profiling-analysis

  • Identify training bottlenecks
  • Analyze operator runtime
  • Optimize npu performance
  • Check compute vs memory bound

About this skill

模型 Profiling 数据分析

对基于 Ascend NPU 训练的模型,通过 torch.profile 采集的 profiling 数据进行自动化分析,拆解模型性能瓶颈,统计 cube/vector 算子耗时比例,计算和访存比例。

触发条件

当用户提供 profiling 数据目录路径并要求以下任一分析时调用此 skill:

  • 分析模型训练耗时瓶颈
  • 分析 step trace 中计算/通信/空闲占比
  • 分析 kernel 算子耗时分布
  • 分析计算 vs 访存带宽比例

执行步骤

1. 确认路径

用户需提供 profiling 数据根目录(包含 *_ascend_pt 子目录的路径),例如:

D:\profile\gr00t-n1.6

如果用户未提供路径,使用 AskUserQuestion 询问。

2. 运行分析脚本

执行以下命令(使用 miniconda3 的 Python 环境):

& "$env:USERPROFILE\miniconda3\python.exe" "D:\code\DrivingSDK\mx_driving\tools\profile_analyse\profile_analyse.py" "<用户提供的路径>"

3. 解读结果

脚本会输出以下分析内容,将结果整理后呈现给用户:

Section 1 — Step Trace 分析:

  • 各卡耗时明细表(Computing / Comm / FreeTime in us)
  • 数据分析表(耗时占比 + 耗时波动 min~max)

Section 2 — Kernel Details 分析:

  • 每种算子计算耗时与访存带宽耗时占比(Top 20,含计算类型 cube/vector)

Section 3 — 整网计算 vs 访存比例:

  • 计算:访存百分比比值(如 43.20% : 56.80%)
  • Cube:Vector 百分比比值(如 64.85% : 35.15%)

CSV 输出文件(保存在 mx_driving\tools\profile_analyse\ 目录下,所有数值保留两位小数):

文件说明
step_trace_analysis.csvStep 1 — 各卡耗时明细 + Summary(耗时占比与波动)
top20_ops_compute_memory_breakdown.csvStep 2 — Top 20 算子计算/访存耗时占比
computing_summary.csvStep 3 — cube/vector 大类汇总 + 计算:访存 / Cube:Vector 比例

注意事项

  • Kernel Details 分析只取第一张卡的 kernel_details.csv 以加速计算
  • 若 step_trace_time.csv 包含多个 Step,脚本自动取最后一个 Step 进行分析

依赖

  • Python 环境:miniconda3(路径 $env:USERPROFILE\miniconda3\python.exe
  • 三方库:pandas, numpy

When not to use it

  • The task does not involve Ascend NPU profiling data
  • The task does not require analysis of training performance bottlenecks

Prerequisites

miniconda3 Python environmentpandas Python librarynumpy Python library

Limitations

  • Kernel Details analysis only takes the first card's kernel_details.csv
  • If step_trace_time.csv contains multiple Steps, the script automatically takes the last Step for analysis

How it compares

This skill automates the analysis of complex Ascend NPU profiling data, providing a structured breakdown of performance bottlenecks and detailed reports, which is more efficient than manual interpretation of raw profiling logs.

Compared to similar skills

ascend-profiling-analysis side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
ascend-profiling-analysis (this skill)02moNo flagsAdvanced
google-analytics437moReviewIntermediate
backtesting-trading-strategies101moReviewIntermediate
model-usage52moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

google-analytics

davila7

Analyze Google Analytics data, review website performance metrics, identify traffic patterns, and suggest data-driven improvements. Use when the user asks about analytics, website metrics, traffic analysis, conversion rates, user behavior, or performance optimization.

43193

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

model-usage

openclaw

Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.

548

tracking-crypto-derivatives

jeremylongshore

Track cryptocurrency futures, options, and perpetual swaps with funding rates, open interest, liquidations, and comprehensive derivatives market analysis. Use when monitoring derivatives markets, analyzing funding rates, tracking open interest, finding liquidation levels, or researching options flow. Trigger with phrases like "funding rate", "open interest", "perpetual swap", "futures basis", "liquidation levels", "options flow", "put call ratio", "derivatives analysis", or "BTC perps".

437

spark-optimization

wshobson

Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.

431

weights-and-biases

davila7

Track ML experiments with automatic logging, visualize training in real-time, optimize hyperparameters with sweeps, and manage model registry with W&B - collaborative MLOps platform

325

Search skills

Search the agent skills registry