external-mindstudio-mindstudio-profiler-data-check
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "external-mindstudio-mindstudio-profiler-data-check" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-837dd414e9da318357770cf515efc6bcd5013662466175a2d121ef13b3d1b27c. Verify the upstream source and version against https://github.com/ascend-ai-coding/awesome-ascend-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Validate integrity, collection status, and key configuration of performance data collected by MindStudio Profiler (including framework Profiler and msprof command-line tool data) to ensure downstream analysis tools can run correctly.
Introduction source: third_party · ascend-ai-coding · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: external-mindstudio-mindstudio_profiler_data_check
description: 当用户提供 MindStudio profiler 采集的性能数据(框架 profiler、msprof 命令行)时,对数据完整性、采集状态及关键配置进行校验,确保后续分析工具能正常运行。
keywords:
- profiler
- 性能分析
- 数据检查
original-name: mindstudio_profiler_data_check
synced-from: https://github.com/kali20gakki/mindstudio-skills
synced-date: '2026-05-26'
synced-commit: f6695da3cfa864a100db5a94f594b638aeff6389
license: UNKNOWNMindStudio Profiler 数据校验
技能目标
在深入性能分析前,对 profiler 数据进行「体检」,确保:
- 正确识别数据类型(框架 profiler / msprof)
- 采集过程正常结束(流程正常 Stop)
- 数据已解析,关键交付件存在
- 识别 profiler 配置,预判后续分析可行性
数据类型特征
| 类型 | 标识特征 | 采集方式 |
|---|---|---|
| 框架 profiler | [*]_ascend_pt(PyTorch)或 [*]_ascend_ms(MindSpore) |
代码内嵌,进程级 |
| msprof | 含 PROF_{} 目录 |
命令行,进程级 |
框架 profiler 含 torch_npu/MindSpore 框架 API、CANN API、device 算子、硬件指标;msprof 含 CANN API、device 算子、硬件指标。
依赖与资源
- MCP 工具:
msprof-mcp__get_profiler_config(profiler_path)— 解析 profiler_info.json(仅框架 profiler) - 离线解析:
- 框架 profiler:
scripts/offline_parse_pytorch.py <profiler_path>(PyTorch),scripts/offline_parse_mindspore.py <profiler_path>(MindSpore) - msprof:
msprof --export=on --output=<output_path>(output 指向PROF_{}所在路径或导出目录)
- 框架 profiler:
分析步骤
- 多卡原则:多卡数据默认只抽查一张卡(如 Rank0);仅当用户明确要求「每张卡都检查」「逐卡校验」时,再逐卡检查。
- 类型绑定原则(必须严格遵守):数据类型的判定依据是用户给定的顶层路径。判定后,全程只执行该类型对应的步骤,不得混用。
- 若顶层路径以
[*]_ascend_pt或[*]_ascend_ms结尾 → 仅用框架 profiler 规则。 - 若顶层路径为
PROF_[*]目录 → 仅用 msprof 规则。
- 若顶层路径以
1. 识别数据类型
[*]_ascend_pt→ 框架 profiler(PyTorch);多子目录→多卡,单目录→单卡[*]_ascend_ms→ 框架 profiler(MindSpore);多子目录→多卡,单目录→单卡PROF_[*]→ msprof 命令行;多子目录 → 多卡,单目录 → 单卡
2. 校验采集状态 (Stop Check)
- 框架 profiler:检查
profiler_info.json或profiler_info_{Rank_ID}.json;缺失则提示「采集未正常 Stop」,终止,建议检查profiler.stop() - msprof:检查
PROF_{}/device_{}/下是否存在end_info.{}({}为 device 编号占位);缺失则提示「采集未正常结束」,终止
3. 解析配置(仅框架 profiler)
- 框架 profiler:调用
get_profiler_config读取 profiler_info.json,关注profiler_level、with_stack、with_modules、record_shapes、profile_memory。 - msprof:无需检查配置,跳过本步骤。
4. 校验解析状态 (Parse Check)
- 框架 profiler:检查是否存在
ASCEND_PROFILER_OUTPUT或对应解析输出目录;若缺失则停止分析,询问用户是否协助解析,同意则执行offline_parse_pytorch.py(PyTorch)或offline_parse_mindspore.py(MindSpore)。 - msprof:检查
PROF_{}下是否存在mindstudio_profiler_output目录(即msprof --export=on的导出结果);若缺失则停止分析,询问是否协助执行msprof --export=on --output=<path>。 - 解析完成(或已存在解析结果)后,继续第 5 步。
5. 检查关键交付件
- 框架 profiler:按
export_type检查——Text 模式需trace_view.json、kernel_details.csv;DB 模式需[*]_profiler_[*].db。缺失则警告影响 Timeline/算子分析。 - msprof:检查
PROF_{}下是否含msprof_[*].db,或mindstudio_profiler_output下是否含msprof_{timestamp}.json、op_summary.csv。都缺失则警告。
输出策略
本技能为前置校验,不必每次都输出完整报告:
- 用户明确要求「检查数据」「看校验结果」时,输出简洁结构化报告,按以下格式(每项一行,无则略过):
【类型】框架 profiler (PyTorch/MindSpore) 或 msprof 命令行采集 | 单卡/多卡 【状态】valid / invalid / unparsed 【配置】level、with_stack、profile_memory、采集步数等关键项(仅框架 profiler) 【缺失】trace_view.json、kernel_details.csv 等(如有) 【建议】需解析 / 检查 profiler.stop / 无 【下一步】推荐的分析技能或操作 - 前置调用(用户在做 Timeline / 算子分析等):
invalid(未 Stop)→ 必须告知并终止unparsed(未解析)→ 告知需先解析并询问是否协助- 校验通过 → 静默进入后续分析
约束
invalid(未正常 Stop)必须终止流程unparsed(未解析)必须优先引导解析,否则后续工具无法运行
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对 MindStudio Profiler 性能数据校验,解决用户在性能分析前的数据完整性检查痛点
- 属于明确场景的通用工具,具有广泛受众的实用能力
Highlights
- description 明确描述触发场景(用户提供 MindStudio Profiler 数据时)
- 覆盖框架 profiler 和 msprof 两种类型,边界清晰
Highlights
- 文档结构清晰,包含技能目标、数据类型特征、依赖与资源、分析步骤、输出策略、约束等完整章节
- 步骤划分明确,有出口条件,frontmatter 完整
Highlights
- 工具来源明确(MCP 工具、离线解析脚本),参数正确
- 覆盖主要异常(未 Stop、未解析),不可逆操作有确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.