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/cases/tilelang/pr_tilelang_fa_pr698.md
View on GitHub# PR #698 "Add FA high performance"【PR】
## 基本信息
- 算子类别:attention
- DSL/框架:tilelang
- 类型:PR
- 来源可信度:一手 PR 原文(引用了 GitCode 镜像 README "最新动态"原文)
## 来源链接
- PR/出处链接:<https://github.com/tile-ai/tilelang-ascend/pull/698>( 已验证可达,验证日期 2026-08)
- 优化代码查看:<https://github.com/tile-ai/tilelang-ascend/pull/698/files>(PR 涉及 cross_core_pipeline 大量提交:C/V 作用域交替切分 stage、scanline 分析消除 false ring-buffering、共享 buffer 识别修复等)
## 问题与瓶颈
高性能 Flash Attention 实现;原文未附 profiling 瓶颈定位数据。GitCode 镜像 README "最新动态"原文:"2026年3月28日:发布高性能 Flash Attention 和稀疏 Flash Attention 基准测试及优化指南,详见 PR#698 和 PR#665"。
## 优化方法(理论手段)
1. cross_core_pipeline:C/V 作用域交替切分 stage——让 Cube/Vector 流水重叠,消除跨核等待空洞。
2. scanline 分析消除 false ring-buffering——避免保守的 buffer 依赖分析导致的伪环缓冲,提升 buffer 利用率。
3. 共享 buffer 识别修复——正确识别可复用的片上 buffer,减少内存占用。
## 性能对比
PR 页未直接给出量化表(原文未附量化数字);配套官方 benchmark 见 [pr_tilelang_benchmark_vs_ascendc.md](pr_tilelang_benchmark_vs_ascendc.md)。
## 适用范围与警示
- 适用 shape/dtype/芯片:原文未附。
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 |