Merged
fix(mhc): 新增 TextGatedResidualGrad 和Readme文档 #15537
fix(mhc): 新增 TextGatedResidualGrad 和Readme文档 #15537
Merged
azyuliAdd on 6 days ago
azyuli
azyuliCollaborators
6 days ago

描述

补充 TextGatedResidualGrad 算子 README 和 ACLNN 接口文档

关联的Issue

关联Issue #7267

测试

文档更新

类型标签

  • [ ×] 📝 文档更新
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for azyuli's contribution.)
azyuliazyuliCollaborators
6 days ago Created pull request, commit b5e5ed86
atomgit-bot
atomgit-bot
6 days ago Comments:

变更摘要

本 PR 为 mhc/text_gated_residual_grad 增加了纯文档内容,补充 TextGatedResidualGrad 反向算子的说明文档与 ACLNN 两段式接口文档,覆盖前向计算定义、梯度定义、参数类型与形状、可选参数组合、产品支持范围与规格边界,并给出可编译的调用示例。不包含算子实现代码。

主要改动

  • 新增算子说明文档 mhc/text_gated_residual_grad/README.md: 给出 TextGatedResidualGrad 的前向公式与 dxdx、dwDowndwDown、dwUpdwUp、dwGatedwGate、dgammadgamma 的梯度定义,说明 wGate 缺省时不含注入分支、gamma 缺省时缩放系数为 1。
  • 补充参数表与约束说明: 明确 gradMixed、x、wDown、wUp、invRms、downPreAct、up 等输入以及可选输入 gradInject、wGate、gamma、inject 的数据类型(FLOAT16/BFLOAT16 与 FLOAT32 分布)和 [B,S,...] 形状要求,并规定输出覆盖写入、支持非连续 Tensor、支持 B=0 或 S=0 等行为。
  • 新增 ACLNN 接口文档 docs/aclnnTextGatedResidualGrad.md: 定义 aclnnTextGatedResidualGradGetWorkspaceSize 与 aclnnTextGatedResidualGrad 的函数原型、参数含义、aclnnStatus 返回码(如 ACLNN_ERR_PARAM_NULLPTR、ACLNN_ERR_PARAM_INVALID),并说明第二段接口为异步提交、需调用 aclrtSynchronizeStream 同步。
  • 明确可选参数成组约束: 规定 wGate、gradInject、inject、dwGate 四者需同时提供或同时为 nullptr,gamma 与 dgamma 需同时提供或同时缺省,两组相互独立且不可用 shape 为 [0] 的占位 Tensor 代替。
  • 给出产品规格与 C/H/R 边界关系: 按 Ascend 950(56 AIV)与 Atlas A2/A3(40 AIV)分别给出通道数 C 范围及 KK、Hmax⁡H_{\max}、Rmax⁡R_{\max} 计算公式,并列出固定 R=320 或 H=2560 时的边界示例,附 BFLOAT16 场景下 dx[0]=125 的完整调用示例。

🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
6 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
6 days ago Comments:

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
*/*/README.md ✅ 杨露, kdy18482276080, luwei_1104 (3/2) ✅ 杨露 (1/1)
*/*/docs/acl*.md ✅ kdy18482276080, luwei_1104, 杨露 (3/2) ✅ 杨露 (1/1)
mhc ✅ kdy18482276080, luwei_1104 (2/2) ✅ luwei_1104 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
6 days ago Set monologue815,jiang-lirui,Allan_Yu,gitee-duhuiping,claire8090,liudan12,luwei_1104,gitcode-chenjiao,kdy18482276080,Ww7012,mabing1118,fengying555682,xuejinghui,wangxun21,zzzzzzyf_,caiwenwen,yanglu-1 as approver
110 messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
5 days ago Added label: ci-pipeline-passed
yanglu-1Collaborators
5 days ago Comments:

/lgtm
/approve

likedislike
luwei_1104Collaborators
5 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
5 days ago Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
5 days ago Merged pull request