Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Documents
huawei-cloud-msot-msopprof-operator-profiler
Try itCollect operator-level performance data on Ascend NPU via msopprof, with device or simulator modes and analysis reports.
What it does
Profiles operator execution on Ascend NPU hardware using Huawei's msopprof tool, with a configurable collection mode (device or simulator) and report generation. Output data can be exported to a profiling database, and a built-in knowledge base offers case studies (YOLO, ResNet, UNet) and optimization recipes (Conv2D, MatMul, Attention, NMS) to guide tuning.
When to use it
- Profiling operator-level latency and throughput on Ascend NPU
- Comparing device vs simulator performance characteristics
- Collecting performance data for model migration optimization
- Generating reports to identify operator-level bottlenecks
The skill document
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 queryhuawei-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:
┌─────────────────────────────────────────────────────────────┐
│ msOT msopprof Operator Profiler Skill │
├─────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Profiling │───▶│ Data │───▶│ Report │ │
│ │ Config │ │ Collection │ │ Generation │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Mode │ │ Operator │ │ Data │ │
│ │ Selection │ │ Execution │ │ Export │ │
│ │ (Device/Sim)│ │ Monitoring │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
Use Cases
Typical Problem Scenarios:
- Collecting operator-level performance data on Ascend NPU
- Profiling model inference performance
- Identifying performance bottlenecks through operator execution
- Comparing operator performance between device and simulator modes
- Generating performance analysis reports for model optimization
Typical User Phrases:
- "Profile operator performance on Ascend NPU"
- "Collect performance data using msopprof"
- "Generate performance analysis report"
- "Compare device vs simulator profiling"
- "Identify performance bottlenecks"
- "AscendCollectionOperatorPerformanceData"
- "msopprofPerformance"
- "PerformanceAnalysisReport"
Scope
Supported:
- Operator performance data collection
- Device mode profiling
- Simulator mode profiling
- Report generation
Not supported:
- System-level profiling
- Non-Ascend platforms
Core Workflow
1. Profiling Configuration
- Set up profiling parameters
- Configure collection mode (device/simulator)
2. Data Collection
- Execute profiling on target model
- Collect operator performance data
3. Report Generation
- Generate profiling reports
- Output performance metrics
4. Data Export
- Export data to profiling database
- Prepare for further analysis
Enhanced Features
Best Practices Knowledge Base
This skill integrates a searchable knowledge base containing migration success stories and optimization patterns:
Features:
- Case Study Repository: Searchable database of migration success stories for common model architectures
- Operator Optimization Recipes: Proven optimization patterns with code snippets for common operators
- Similarity Matching: Recommends proven solutions based on model architecture similarity
- Performance Patterns: Collection of known performance patterns and anti-patterns
- Expert Recommendations: Curated tips from Ascend optimization experts
Knowledge Base Structure:
- Case Studies: YOLO, ResNet, UNet migration success stories
- Operator Recipes: Conv2D, MatMul, Attention optimization patterns
- Performance Patterns: Common bottleneck patterns and solutions
- Expert Tips: Optimization best practices from field experts
YOLOv8 Migration Success Story
Model Information
- Model: YOLOv8s
- Input: 640x640
- Target: Ascend 910B
Challenges Encountered
-
Issue: NMS operator fallback to CPU
- Solution: Implemented AscendC NMS operator
- Gain: 30% latency reduction
-
Issue: Memory bandwidth bottleneck
- Solution: Optimized data layout and batch processing
- Gain: 15% throughput improvement
-
Issue: Custom activation function
- Solution: Replaced with supported operators
- Gain: Stable NPU execution
Final Results
- Latency: 8.2 ms → 5.1 ms (-37.8%)
- Throughput: 122 FPS → 196 FPS (+60.7%)
- Accuracy: 60.2% → 60.4% (+0.2%)
Key Takeaways
- Always check operator coverage before migration
- Implement custom operators for critical path
- Optimize memory access patterns
Operator Optimization Recipes
- Conv2D: Padding overhead → Use native NPU padding (5-10% gain)
- MatMul: Memory layout → Optimal tiling config (10-15% gain)
- Attention: FlashAttention → Enable NPU FlashAttention (20-30% gain)
- NMS: CPU fallback → AscendC implementation (25-35% gain)
Reference Documents
- Acceptance Criteria - Functional acceptance criteria
- Verification Method - Verification approach
- Troubleshooting - Common issues and solutions
Prerequisites
- msopprof >= 1.0.0 installed
- CANN >= 7.0.0 installed
- Ascend NPU driver installed
- Operator code to be analyzed
Core Commands
# Collect operator performance data
msopprof --output=/path/to/output \
--mode=device \
./my_operator
# Analyze performance report
python3 scripts/analyze_profile.py --data /path/to/output
Parameter Confirmation
- output: Performance data output path (Required)
- mode: Collection mode (device/simulator) (Optional)
- operator: Operator executable file path (Required)
Questions people ask
- What hardware and software are required?
- An Ascend NPU with its driver installed, CANN >= 7.0.0, msopprof >= 1.0.0, and the operator code to be analyzed.
- Does it support profiling without real NPU hardware?
- Yes. msopprof mode can be set to simulator for offline collection alongside the device mode.
- What does the integrated knowledge base contain?
- Searchable case studies for YOLO, ResNet, and UNet migrations; optimization recipes for Conv2D, MatMul, Attention, and NMS; and curated performance patterns from Ascend experts.
Related skills
Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
More from huaweicloud-skills-team
Browse all skillsSearch the Huawei Cloud skill catalog by keyword or category, then install the matching skill.
Read-only queries of Huawei Cloud resources, specs, and images via local Python scripts.
Provides guidance for Huawei Cloud KooCLI command-line tool operations. Covers KooCLI installation, IAM authentication configuration, access credential configuration, command construction, common error troubleshooting. Use this skill when users ask about any cloud-related services or wants to operate Huawei Cloud services from the terminal. Triggers: Huawei Cloud, huaweiyun, "华为云","华为cli", "命令行", KooCLI, hcloud, huaweiyunCLI, Huawei Cloud command line, OBS, ECS, VPC, "云", yun, huaweiyun tool, huawei tool, "华为云工具", "云工具", "工具"
One-click deployment of JiuwenSwarm multi-Agent collaboration platform on Huawei Cloud Flexus L instances. Usage scenarios: When users need to quickly deploy JiuwenSwarm/JiuwenClaw on Huawei Cloud Flexus L instances, when they need to automatically create cloud instances and deploy AI Agent platforms, when they need to configure model APIs and message channels (Xiaoyi/Feishu/DingTalk). Automatically create instances, deploy applications via COC, configure models and message channels. Trigger keywords: JiuwenSwarm deployment, JiuwenClaw deployment, 九问Swarm部署, 九问Claw部署, 一键部署JiuwenSwarm, AI智能体平台部署, 部署九问Swarm, 部署九问Claw,云服务器部署AI平台.
Provides access guide for Huawei Cloud Graph Database GES service. Covers Cypher queries, GQL queries, schema/label management, summary info queries, graph data editing and more. Use this skill when users want to operate Huawei Cloud graph database GES service via terminal.
Configure passwordless SSH login to Huawei Cloud ECS instances using COC (Cloud Operations Center). Automates IAM agency authorization, SSH key pair generation, COC script deployment to one or many target ECS instances (batch), SSH connection testing, and automatic security cleanup after 60 seconds (removing keys from both local and remote). 触发词: 免密登录, COC SSH, ECS key login, SSH key deployment, passwordless SSH