Install
openclaw skills install @huaweiclouddev/huawei-cloud-ascendc-operator-performance-optimDevelop and optimize custom operators using AscendC programming language. Analyze operator performance bottlenecks and conduct optimization validation. Based on AscendC and CANN toolkit Use this skill when the user wants to: (1) optimize performance-critical operators on Ascend NPU, (2) develop custom operators for specific workloads, (3) improve model inference performance through operator optimization Trigger: user mentions "AscendC", "operator optimization", "custom operator", "performance", "NPU optimization", "Ascend operator", "算子优化", "自定义算子", "算子开发", "AscendC算子", "性能优化"
openclaw skills install @huaweiclouddev/huawei-cloud-ascendc-operator-performance-optimThis skill provides guidance for developing and optimizing custom operators using AscendC programming language.
Architecture: Performance Analysis → Bottleneck Identification → Operator Development → Optimization → Validation
Related Skills:
huawei-cloud-ascend-profiler-db-explorer - Performance data analysis and bottleneck identificationhuawei-cloud-ascend-small-model-migrate - Migration workflow that may require operator optimizationThis skill involves the following cloud services and components:
Architecture Diagram:
┌─────────────────────────────────────────────────────────────┐
│ AscendC Operator Optimization Skill │
├─────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Performance │───▶│ Bottleneck │───▶│ Operator │ │
│ │ Analysis │ │ Identification│ │ Development │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Profiling │ │ Optimization│ │ Validation │ │
│ │ Data │ │ Techniques │ │ & Testing │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
Typical Problem Scenarios:
Typical User Phrases:
Supported:
Not supported:
| Document | Description |
|---|---|
| Acceptance Criteria | Functional acceptance criteria |
| Verification Method | Verification approach |
| Troubleshooting | Common issues and solutions |
# Analyze operator performance bottlenecks
msprof --output=/path/to/output ./my_operator
# Optimize operator using AscendC
# Refer to CANN development guide for operator development
| Parameter | Description | Required |
|---|---|---|
| Operator code path | Operator source code to be optimized | Yes |
| Output directory | Performance analysis result output path | Yes |
| Optimization strategy | Performance optimization scheme selection | No |
Performance analysis results are saved in the specified output directory:
output/
├── summary.json # Performance summary
├── operator_stats.csv # Operator execution statistics
├── timeline.json # Execution timeline data
└── recommendations.md # Optimization recommendations
Summary JSON Structure:
{
"total_time_ms": 1234.56,
"operator_count": 42,
"top_operators": [
{"name": "CustomGEMM", "time_ms": 456.78, "percentage": 37.0},
{"name": "VectorAdd", "time_ms": 123.45, "percentage": 10.0}
],
"optimization_candidates": ["CustomGEMM", "DataTransfer"]
}
speedup = time_before / time_afterASCENDC_DEBUG=1 for verbose logging/var/log/npu/msprof for detailed performance breakdown