已合并
feat(mhc): 新增 TextGatedResidual 算子 #15380
feat(mhc): 新增 TextGatedResidual 算子 #15380
已合并
kdy18482276080创建于 4 天前
kdy18482276080成员
4 天前

描述

新增 mhc/text_gated_residual 算子,融合分组 RMSNorm、低秩 down/SiLU/up、sigmoid 混合及可选 inject,支持 FP16/BF16、可选 gamma 和反向缓存输出。
支持 A2/A5,GM 偏移采用 int64_t;关闭 needBackward 时不写入、不回拷缓存,输出申请不做零初始化。

关联的Issue

暂无关联 Issue。

测试

  • A2/A5 各 24 个独立 CPU golden 五输出代表用例通过,各 5 个极值输入拒绝检查通过。
  • Host UT:大小路径、两种 dtype、缓存输出 shape 检查通过。
  • op_api UT:两种 dtype、needBackward 开关组合通过。
  • 五组 A5 profiler 确认无 ZerosLike 辅助核。
  • 不包含 kernel UT;真实 CATLASS 计算由设备构建和上板精度验证。
  • 上板结果基于迁移前等价实现;当前新主线交付分支已运行 host/op_api UT,尚未重跑完整上板矩阵。
  • 全量 sign-conversion 诊断未完成;OAT 曾受环境依赖冲突影响,未计为通过。

文档更新

新增 ACLNN、Torch 接口文档及 README,更新五处全局接口目录。
交付测试只包含 UT,不包含 ST、assets 和历史 benchmark/调优记录。

类型标签

关联需求 Issue

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

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 kdy18482276080 的贡献)
Kkdy18482276080成员
4 天前 创建了 pull request,commit 86c91183
atomgit-bot
atomgit-bot
4 天前 评论:

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

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

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
*/*/op_host/*_def.cpp ✅ 汤磊, xuejinghui, wangxun21 (3/2) ✅ 汤磊 (1/1)
*/*/op_host/op_api/aclnn*.h ✅ 汤磊, xuejinghui, wangxun21 (3/2) ✅ 汤磊 (1/1)
mhc ✅ xuejinghui, wangxun21 (2/2) ✅ xuejinghui, wangxun21 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
kdy18482276080成员
4 天前 评论:

compile

likedislike
此处折叠了163条消息 查看更多
wangxun21成员
3 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
3 天前 添加了label:lgtm
CANN-robot
CANN-robot成员
3 天前 评论:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
monologue815成员
3 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
3 天前 合入了pull request