news 2026/6/3 20:47:23

CANN/cannbot-skills Flash Attention优化笔记

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CANN/cannbot-skills Flash Attention优化笔记

Deep Note:agent/example/kernels/a2/flash_attn_full_pj_hif8_commonub.py

【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills

Open this file only after the short catalog entry confirmed the kernel is relevant.

What this kernel is really for

  • comparing againstflash_attn_full_pj_hif8.pyafter the math contract is already understood
  • studying how a shared vec-side slot buffer changes queueing structure without changing the visible formula

Decisions worth copying

  • move vec scratch from two plainTensorviews onto one sharedDBufffamily:ub_score_pv + score_pv_cnt
  • keepstage1_cntandstage2_cntseparate even though the shared scratch family exists
  • treat the gain as a same-side vecubinqueueing improvement, not as a new cross-side ownership model
  • do not expect UB-footprint reduction here; the point is cleaner overlap between the next preload and current vec compute

Prefer another kernel when

  • you are still deriving the math contract and want the simpler readable baseline
  • you are debugging row-max / row-sum correctness and do not want shared vec scratch lineage in the picture yet

【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/3 20:45:50

基于Arduino Nano自制频率计:从原理到实践,实现0-6.5MHz宽范围测量

1. 项目概述:为什么我们需要一个自制的频率计?在捣鼓电子电路、调试单片机或者维修一些老设备时,你手边最常需要的是什么工具?万用表、示波器,还有一个可能就是频率计。市面上的成品频率计,功能强大的价格不…

作者头像 李华
网站建设 2026/6/3 20:45:50

终极指南:5分钟掌握通达信缠论量化插件完整使用教程

终极指南:5分钟掌握通达信缠论量化插件完整使用教程 【免费下载链接】Indicator 通达信缠论可视化分析插件 项目地址: https://gitcode.com/gh_mirrors/ind/Indicator 缠论量化插件是专为通达信用户设计的智能分析工具,将复杂的缠论理论转化为直观…

作者头像 李华
网站建设 2026/6/3 20:45:45

Arduino超声波测距:无屏方案实现与串口通信实践

1. 项目概述:为什么选择无屏测距方案?在嵌入式开发和物联网原型设计的初期,我们常常面临一个选择:是追求功能的完备性,还是优先验证核心逻辑的可行性?对于测距应用来说,一个直观的显示屏似乎是“…

作者头像 李华
网站建设 2026/6/3 20:44:47

AntiMicroX游戏手柄映射技术深度解析:架构设计与专业配置指南

AntiMicroX游戏手柄映射技术深度解析:架构设计与专业配置指南 【免费下载链接】antimicrox Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support. 项目地址: https://gitcode.co…

作者头像 李华
网站建设 2026/6/3 20:41:46

3分钟完成Windows和Office永久免费激活的终极指南

3分钟完成Windows和Office永久免费激活的终极指南 【免费下载链接】KMS_VL_ALL_AIO Smart Activation Script 项目地址: https://gitcode.com/gh_mirrors/km/KMS_VL_ALL_AIO 还在为Windows系统激活和Office办公软件激活而烦恼吗?KMS_VL_ALL_AIO智能激活脚本为…

作者头像 李华