Help us improve
Share bugs, ideas, or general feedback.
From external-gitcode-ascend-skills
Analyzes Huawei Ascend NPU profiling data from step_trace_time.csv to identify computing, communication, and hostbound bottlenecks. Provides optimization recommendations.
npx claudepluginhub ascend-ai-coding/awesome-ascend-skills --plugin migration-ascend-torchnpu-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/external-gitcode-ascend-skills:profiling-analysisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
profiling-analysis 是一套完整的华为昇腾NPU性能分析技能集,用于分析Profiling生成的性能数据,自动识别系统性能瓶颈类型(计算、通信、下发),并提供深入分析能力和优化建议。
profiling-analysis-communication/reference/communication-operator-analysis.mdprofiling-analysis-communication/reference/slow-rank-detection.mdprofiling-analysis-communication/scripts/detect_slow_rank.pyprofiling-analysis-computing/reference/matmul_shape_extraction.mdprofiling-analysis-computing/scripts/extract_op_shapes.pyprofiling-analysis-computing/scripts/op_high_time_selector.pyprofiling-analysis-computing/scripts/op_perf_analysis_combine.pyprofiling-analysis-computing/scripts/op_pivot_table_analyzer.pyprofiling-analysis-hostbound/reference/ftrace-analysis.mdprofiling-analysis-hostbound/reference/slow-cards-analysis.mdprofiling-analysis-hostbound/scripts/slow_cards_analyzer.pyprofiling-analysis-hostbound/scripts/trace_analyzer.pyscripts/performance_analysis_main_process.pyAnalyzes Huawei Ascend NPU profiling data to detect performance anomalies (bubbles, wait-anchor, AICPU exposure) and reverse-engineers a model architecture report from profiling traces.
Analyzes GPU performance from NVIDIA Nsight Systems profiles (.sqlite/.nsys-rep) to identify bottlenecks, NCCL slowdown, MFU/efficiency, and more.
Inspects LLM torch profiler traces at forward-pass, layer, and kernel level. Outputs timing tables for Perfetto navigation and layer-level analysis.
Share bugs, ideas, or general feedback.
profiling-analysis 是一套完整的华为昇腾NPU性能分析技能集,用于分析Profiling生成的性能数据,自动识别系统性能瓶颈类型(计算、通信、下发),并提供深入分析能力和优化建议。
profiling-analysis 技能通过以下流程自动完成性能分析:
step_trace_time.csv 文件根据判定的瓶颈类型,自动调用对应子技能进行深入分析:
profiling-analysis-hostbound 子技能profiling-analysis-computing 子技能,执行完整分析流程profiling-analysis-communication 子技能输出完整的性能分析报告,包括:
┌─────────────────────────────────────────────────┐
│ 文件扫描与收集 │
│ 递归查找 step_trace_time.csv 文件 │
└─────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ 性能数据解析与计算 │
│ 提取核心指标并计算占比 │
└─────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ 全局统计与瓶颈判定 │
│ 计算平均占比并识别瓶颈类型 │
└─────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ 子技能自动调用 │
│ 根据瓶颈类型触发对应子技能 │
└─────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ 分析报告生成 │
│ 输出完整性能分析结果 │
└─────────────────────────────────────────────────┘
| 参数名称 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| input_path | string | 是 | 输入路径:支持单个Profiling文件路径,或包含多个Profiling文件的文件夹路径 |
调用 skill "profiling-analysis" 分析 "input_path" 中的性能数据
input_path:替换为实际的Profiling数据文件夹路径如果需要直接调用特定子技能进行深入分析:
# 分析计算瓶颈
调用 skill "profiling-analysis-computing" 分析 "input_path" 中的高耗时算子
# 分析通信瓶颈
调用 skill "profiling-analysis-communication" 分析 "input_path" 中的通信性能
# 分析下发瓶颈
调用 skill "profiling-analysis-hostbound" 分析 "input_path" 中的Host侧问题
profiling-analysis 包含以下子技能,用于不同类型的性能分析。当主技能检测到对应瓶颈时,会自动调用子技能进行深入分析,无需手动执行:
| 子技能名称 | 功能描述 | 适用场景 |
|---|---|---|
| profiling-analysis | 主分析技能,识别性能瓶颈类型 | 首次分析Profiling数据,快速定位主要瓶颈 |
| profiling-analysis-computing(.\profiling-analysis-computing\SKILL.md) | 计算瓶颈分析,包含: - 高耗时算子筛选(Top-N算子) - 算子性能数据透视表分析 - 关键算子(如MatMul系列)形状解析与优化建议 | 计算占比过高时,深入分析具体的高耗时算子及其性能特征 |
| profiling-analysis-communication(.\profiling-analysis-communication\SKILL.md) | 通信瓶颈分析,分析集合通信性能 | 通信占比过高时,分析通信操作的性能 |
| profiling-analysis-hostbound(.\profiling-analysis-hostbound\SKILL.md) | 下发瓶颈分析,分析Host侧性能问题 | 空闲占比过高时,分析Host侧的下发问题 |
step_trace_time.csv:包含计算、通信、空闲等时间占比信息op_statistic.csv:包含算子执行统计信息kernel_details.csv:包含算子内核详细执行信息op_summary.csv:包含算子执行摘要信息analysis.db:Profiling数据库文件