Deep Note:agent/example/kernels/a5/flash_attn_full_fp8_causal.py【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skillsOpen this file only after the short catalog entry confirmed the kernel is relevant. Its job is to capture the extra rationale that would otherwise bloat the catalog entry.What this kernel is really forthe multi-row full-sequence a5 attention path, not the simplerL1decode-stylemha_ifa*familya normalized online-softmax pipeline where delayedp vstays on chipa causal contract where only the diagonal tile needs mixed valid/invalid score handlingDecisions worth copyingtreat both causal masking andS2tail invalidation in score space beforerowmaxkeep future fully-invalid tiles out of the loop withactive_tiles_n Min(tiles_n, tile_m 1)publish vec-producede5m2probability tiles into NDl1pfor the delayed cube consumerkeep separatel0c_qk/l0c_pvandub_score/ub_pvfamilies; do not collapse them into one scratch lineagecompress row-state scratch into narrow[1,64]UB tensors so the larger full-sequence path still fits local memoryPrefer another kernel whenthe query side is still row-specialized (L1) andmha_ifa*already matchesstage 2 truly wants NZ-published probability tilesthe contract is half-domain or non-fp8 rather thane5m2q/k/v【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考