Ascend/msagent / skills/profiler/ascend-profiler-data-validation
ascend-profiler-data-validation
Verified当用户提供 MindStudio profiler 采集的性能数据(框架 profiler、msprof 命令行)时,对数据完整性、采集状态及关键配置进行校验,确保后续分析工具能正常运行。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.0 KB |
| scripts/offline_parse_mindspore.py | script | 1.4 KB |
| scripts/offline_parse_pytorch.py | script | 1.5 KB |
scripts/offline_parse_mindspore.py
View on GitHub"""Offline parser for MindSpore Profiler data (_ascend_ms)."""
import argparse
import os
import shutil
import sys
def _check_msprof() -> None:
"""Ensure msprof is in PATH; required by CANN/profiler analyse."""
if shutil.which("msprof") is None:
print(
"Error: msprof command not found. Please source the correct CANN environment, e.g.:\n"
" source /usr/local/Ascend/ascend-toolkit/set_env.sh"
)
sys.exit(1)
def main() -> None:
parser = argparse.ArgumentParser(
description="Offline parser for MindSpore Profiler data (_ascend_ms)."
)
parser.add_argument(
"profiler_path",
type=str,
help="Path to the profiler result directory (e.g., ./result_data)",
)
args = parser.parse_args()
profiler_path = args.profiler_path
if not os.path.exists(profiler_path):
print(f"Error: Profiler path '{profiler_path}' does not exist.")
sys.exit(1)
_check_msprof()
try:
from mindspore.profiler.profiler import analyse
except ImportError as e:
print(f"Error: MindSpore not installed or analyse unavailable: {e}")
sys.exit(1)
print(f"Starting offline analysis for: {profiler_path}")
try:
analyse(profiler_path=profiler_path)
print("Analysis completed successfully.")
except Exception as e:
print(f"Error during analysis: {e}")
sys.exit(1)
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |