已合并
add allgathermm decode(ubmem) experimental #15418
add allgathermm decode(ubmem) experimental #15418
已合并
王亮培创建于 23 天前
王亮培
王亮培成员
23 天前

描述

experimental 下新增 mc2 算子:AllGatherMatmulV3(ubmem / MTE window 融合,面向 decode 小 M 场景)。

  • 新增该算子的完整 host 工程:op_api(aclnn 接口与校验)、op_host(shape 推导、tiling)、
    op_kernel(AIV gather + AIC MMAD 融合),并适配 torch_extension、补充 test 与 docs;
  • 融合方案:以 HCCL 内置 buffer 作为 ubmem 窗口,AIV 以读模式把各 rank 的 x1/scale 分轮
    搬入本卡窗口,AIC 从窗口读 A 执行 MX 量化 MMAD,AllGather 与 MatMul 在同一 kernel 内流水;
  • 方案优化:按 1024 K 分轮,AIC 首轮就绪即开算;状态区按 (srcRank, coreIdx) 建槽、每核
    1:1 握手,不做全局 Sum;仅对 rankSize-1 个远端 rank 分组轮转、余数核作 leftover;
    B/bias 预取、小行数单 chunk 场景启用下一轮远端预读;L0C 全 K 累加后一次 fixpipe 写出,
    不做 split-K/atomicAdd;MX scale 由 mad_mx 在乘加中直接应用;
  • 支持 rank_size 2/4/8,fp8(e4m3/e5m2 混合)/fp4,ND/NZ、转置/非转置右矩阵,输出
    bf16/fp16;tiling 复用 QuantMatmulTilingData。

关联的Issue

关联Issue #7457:https://gitcode.com/cann/ops-transformer/issues/7457

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 王亮培 的贡献)
王亮培王亮培成员
23 天前 创建了 pull request,commit f087ef10
atomgit-bot
atomgit-bot
23 天前 评论:

🤖 正在生成合并请求摘要,请稍候…

likedislike
不准确?
CANN-robotCANN-robot成员
23 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
23 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
experimental/mc2 ✅ chuguowei, wang-minbo (2/2) ✅ wang-minbo, chuguowei (2/1)
mc2 ✅ chuguowei, wang-minbo (2/2) ✅ chuguowei, wang-minbo (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

wangliangpei, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
王亮培
王亮培成员
23 天前 评论:

compile

likedislike
此处折叠了88条消息 查看更多
王亮培王亮培成员
16 天前 解决了最后一个问题
wang-minbo
wang-minbo成员
16 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
16 天前 添加了label:lgtm
CANN-robotCANN-robot成员
16 天前 关闭了关联的issue
CANN-robotCANN-robot成员
16 天前 合入了pull request