Skip to main content
Run any Skill in Manus
with one click

triton-ascend-a5-attention

Stars5
Forks1
UpdatedJune 6, 2026 at 17:10

适用于 A5(Ascend950)注意力(attention)机制算子的串行优化指南。当算子的核心计算是 Transformer 风格的注意力运算,且目标硬件为 Ascend950 时应选择此指南。涵盖 Cube/Vector 操作、al.fixpipe/bl.alloc 数据流、串行同步机制(sync_block_set/wait)、Flash Attention 四阶段分解、P 矩阵 ND→NZ 格式转换等 A5 专用技巧。本文档给出的是 Cube/Vector 串行交替执行版本,不适用于不含注意力结构的普通矩阵乘法或归约运算。

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly