Ascend/msagent / skills/operator/ops-performance-tuning
ops-performance-tuning
VerifiedCompile, profile, diagnose, optimize, and compare Ascend NPU operators across CANN versions and A2/A3/A5 for Ascend C, CATLASS, Triton-Ascend, TileLang-Ascend, PyPTO, and SHMEM/MC2. Use when an operator already has a runnable implementation and the user asks for msOpProf collection, bottleneck analysis, source-level tuning, or a reproducible before/after performance report. Do not use as the primary workflow for operator creation, migration, or unresolved correctness failures.
references/optimize/optimize-pipeline.md
View on GitHub# §1.5 Ascend C · 流水与 Double Buffer
> 本文件覆盖 Ascend C 的流水与 Double Buffer 优化技术。
| 技术 | 理论说明 | 代码/参数模式 | 性能对比 |
|---|---|---|---|
| 三级流水范式 | CopyIn/Compute/CopyOut 三级流水,TQue 级间同步,映射 MTE2/V/MTE3 硬件队列 | 文字模式:TQue 队列 + SetFlag/WaitFlag 级间同步 | 未提供可直接复用的版本无关实现;执行时必须核对目标版本 API、附源码位置并实测验证 |
| Double Buffer | `InitBuffer` buffer 数=2;前提:循环 ≥2 且搬运时间不可忽略;反例:未开双缓冲时 Vector 利用率仅约 33% | `InitBuffer(queue, 2, size)`;华为云博客示例 `pipe.InitBuffer(inQueueX, 2, 256)`(<https://bbs.huaweicloud.com/blogs/433234>) | 反例:Vector 利用率仅约 33% |
| MIX 模式异步 Iterate | MIX 模式 `Iterate<false>()` 仅首次发 AIC/AIV 同步消息 | `Iterate<false>()` | 未提供可直接复用的版本无关实现;执行时必须核对目标版本 API、附源码位置并实测验证 |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies. | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |
| meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要". | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |