kali20gakki/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/cases/triton/pr_triton_atomic_simd_24x.md
View on GitHub# PR #208 / #218 "fix(smit): atomic operations using SIMD for better performance"【PR】 后被 revert
## 基本信息
- 算子类别:reduction
- DSL/框架:triton
- 类型:PR
- 来源可信度:一手 PR 原文
## 来源链接
- PR/出处链接:<https://github.com/triton-lang/triton-ascend/pull/218>(2026-05-25 合入;同内容前身 PR #208 <https://github.com/triton-lang/triton-ascend/pull/208>)( 已验证可达,验证日期 2026-08)
- 优化代码查看:<https://github.com/triton-lang/triton-ascend/pull/218/files>
- 回滚 PR:<https://github.com/triton-lang/triton-ascend/pull/376>("Revert ...")、<https://github.com/triton-lang/triton-ascend/pull/405>("Revert fix(smit)... (#218)"),均于 2026-06-03 合入( 已验证可达,验证日期 2026-08)
## 问题与瓶颈
SIMT 模式下带离散掩码的原子操作(atomic add/max/min/and/or/xor)逐元素串行发射,耗时极高。
## 优化方法(理论手段)
1. 改用 SIMD 向量化路径实现离散掩码原子操作——减少标量指令、提升向量利用率,因此大幅降低原子操作耗时。
## 性能对比
(PR 正文 Performance Test 表,shape 16,16,16,单位 µs)
| 指标 | 优化前(SIMT) | 优化后(SIMD) | 变化 |
|---|---|---|---|
| atomic_add_3d INT32 | 81.163 | 3.309 | 约 24.5 倍 |
| atomic_and_3d INT32 | 96.141 | 4.114 | 约 23 倍 |
| atomic_min_3d FLOAT | 92.389 | 3.372 | 约 27 倍 |
另 ROLLBACK 路径 3.5~4.3 µs。
## 适用范围与警示
- 风险说明:该改动合入后曾引发问题并被 revert(PR #376 "Revert ..."、PR #405 "Revert fix(smit)... (#218)",均于 2026-06-03 合入)——引用时需说明该优化经历了"合入→回滚"过程,仅适合作为"SIMT→SIMD 原子操作向量化"的理论方法案例。
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 |