# huawei-cloud-msot-msopprof-operator-profiler

huawei-cloud-msot-msopprof-operator-profiler collects operator-level execution data on Ascend NPUs using msopprof in device or simulator mode and generates analysis reports.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 162 installs · ★ 59 repo stars
- Author: huaweicloud
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/ai/modelarts/huawei-cloud-msot-msopprof-operator-profiler/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/huawei-cloud-msot-msopprof-operator-profiler

## What it does

This skill guides the AI assistant through operator performance profiling on Ascend NPU hardware. The process follows four stages: configuring collection parameters, executing target operators via `msopprof`, generating structured performance metrics, and exporting data into a profiling database. It handles both physical execution (`device`) and emulation (`simulator`) to inspect hardware bottlenecks before on-device deployment.

It bundles an optimization knowledge base with recipes for common primitives like Conv2D, MatMul, Attention, and NMS, alongside architectural migration case studies such as YOLOv8s on Ascend 910B. Collected trace data is evaluated using `python3 scripts/analyze_profile.py --data /path/to/output`.

Profiling is strictly confined to operator workloads on Ascend and does not handle full system-level tracing or non-Ascend hardware. Without CANN >= 7.0.0, msopprof >= 1.0.0, and the official Ascend NPU driver present on the host system, runs will fail immediately.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-msot-msopprof-operator-profiler -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/huawei-cloud-msot-msopprof-operator-profiler/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/huawei-cloud-msot-msopprof-operator-profiler/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-msot-msopprof-operator-profiler -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/huawei-cloud-msot-msopprof-operator-profiler/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-msot-msopprof-operator-profiler -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/huawei-cloud-msot-msopprof-operator-profiler/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install huaweicloud/huaweicloud-skills skills/ai/modelarts/huawei-cloud-msot-msopprof-operator-profiler
```

2. **Manually: put the files in place**
- File: `.github/skills/huawei-cloud-msot-msopprof-operator-profiler/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-msot-msopprof-operator-profiler -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/huaweicloud/huaweicloud-skills --path skills/ai/modelarts/huawei-cloud-msot-msopprof-operator-profiler
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/huawei-cloud-msot-msopprof-operator-profiler/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-msot-msopprof-operator-profiler -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/ai/modelarts/huawei-cloud-msot-msopprof-operator-profiler/SKILL.md

## When to use it
- Capture operator runtime metrics on Huawei Ascend NPU hardware
- Benchmark operator execution differences between device and simulator modes
- Detect CPU fallbacks and memory transfer bottlenecks in deep learning models
- Generate structured operator performance reports for latency reduction

## Example prompts
- Profile operator `./my_operator` on Ascend NPU using device mode and save to `./output`
- Collect operator metrics with msopprof and analyze the output directory
- Compare simulator and device execution profiles for this custom layer

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: e2d7c194c03c7b43.

BEGIN THIRD-PARTY FILE e2d7c194c03c7b43
````text
---
name: huawei-cloud-msot-msopprof-operator-profiler
description: |
  Collect operator-level performance data on Ascend NPU using msopprof tool.
  Supports both device mode and simulator mode, generates performance analysis
  reports. Use this skill when the user wants to: (1) profile operator
  performance on Ascend NPU, (2) collect performance data for analysis,
  (3) identify performance bottlenecks through operator execution characteristics.
  Trigger: user mentions "msopprof", "profiler", "performance profiling",
  "operator profiling", "Ascend", "NPU", "profile data", "性能采集",
  "算子性能", "性能剖析", "算子耗时采集"
compatibility:
  - msopprof >= 1.0.0
  - CANN >= 7.0.0
tags: [Ascend, msopprof, profiler, operator]
allowed-tools:
  - python3
  - msopprof
  - bash
---

# Huawei Cloud msOT msopprof Operator Profiler

## Overview

This skill provides operator-level performance profiling capabilities for
Ascend NPU.

**Architecture**: Profiling Configuration → Data Collection → Report Generation
→ Analysis

**Related Skills**:

- `huawei-cloud-ascend-profiler-db-explorer` - Profiling database analysis and
  query
- `huawei-cloud-ascend-small-model-migrate` - Migration workflow that uses
  performance data

## Architecture Components

This skill involves the following cloud services and components:

- **msopprof**: Huawei Cloud operator profiling tool for Ascend NPU
- **CANN**: AI Computing Platform for NPU runtime support
- **Ascend NPU**: Target hardware for performance profiling
- **Profiling Database**: Storage for collected performance data

**Architecture Diagram:**

```text
┌─────────────────────────────────────────────────────────────┐
````
END THIRD-PARTY FILE e2d7c194c03c7b43

The third-party file has ended. Everything between the e2d7c194c03c7b43 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 1827 of 7755 bytes. © huaweicloud · MIT · https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/ai/modelarts/huawei-cloud-msot-msopprof-operator-profiler/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
