CANNBot设备运行时指南
2026/6/10 8:19:20 网站建设 项目流程

Device and Runtime Facts

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

Use this file for device caps, pipe mappings, supportedauto_sync()pairs, and cross-side mutex signatures. Detailed reasoning still lives in the constraint and pattern pages.

Devices

Resourcea2 (b3)a5 (950)
Cube core count2032
L0A64 KB64 KB
L0B64 KB64 KB
L0C128 KB256 KB
UB192 KB per sub-block256 KB
L1512 KB512 KB
Vec sub-blocks per cube core22

Source:easyasc/globvars.py(defaults),easyasc/a5.py(overrides).

Pipe / op mapping (used byauto_sync())

PipeOps
MTE2gm_to_l1_nd2nz,set_constant_to_l1,gm_to_ub_pad
MTE1l1_to_l0
Mmmad
FIXl0c_to_gm_nz2nd,l0c_to_l1,l0c_to_ub
MTE3ub_to_gm_pad,ub_to_l1_nd2nz,ub_to_l1_nz
Vremaining vec ops

Supportedauto_sync()pipe pairs:

  • vec:MTE2 -> V(ubin),V -> MTE3(ubout)
  • cube:MTE2 -> MTE1(l1),MTE1 -> M(l0),M -> FIX(fix)

Important reminders:

  • there is noV -> MTE2pair
  • dup()beforegm_to_ub_padis not auto-ordered
  • l0c_to_l1is a real FIX-side republish path, not just a codegen detail
  • practical consequence: when one matmul'sL0Cresult feeds a later cube-side matmul, and the intermediate value does not need vec-side UB math first, prefer directL0C -> L1reuse over detouring throughUB

Detail:agent/references/constraints/autosync.md.

Cross-side mutex patterns

  • a5 cube -> vec:CvMutex(src_end_pipe=Pipe.FIX, dst_end_pipe=Pipe.V)
  • a2 cube -> vec:CvMutex(src_end_pipe=Pipe.FIX, dst_end_pipe=Pipe.MTE2); requires GM workspace bridge
  • a5 vec -> cube:VcMutex(src_end_pipe=Pipe.MTE3, dst_end_pipe=Pipe.FIX)
  • a2 vec -> cube: sameVcMutexsignature, but the path still goes through GM workspace

Pattern references:

  • a2 cube -> vec bridge:agent/references/patterns/a2-cube-vec.md
  • a2 vec -> cube bridge:agent/references/patterns/a2-cube-vec-cube.md

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

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

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询