Merged
fix(mhc): 新增 TextGatedResidualGrad 和Readme文档 #15537
azyuliAdd on 6 days ago
fix(mhc): 新增 TextGatedResidualGrad 和Readme文档 #15537
Merged
Pull Request has been successfully merged by CANN-robot.
(Thank you for azyuli's contribution.)atomgit-bot
6 days ago Comments:
6 days ago Comments:
变更摘要
本 PR 为 mhc/text_gated_residual_grad 增加了纯文档内容,补充 TextGatedResidualGrad 反向算子的说明文档与 ACLNN 两段式接口文档,覆盖前向计算定义、梯度定义、参数类型与形状、可选参数组合、产品支持范围与规格边界,并给出可编译的调用示例。不包含算子实现代码。
主要改动
- 新增算子说明文档
mhc/text_gated_residual_grad/README.md: 给出TextGatedResidualGrad的前向公式与 、、、、 的梯度定义,说明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范围及 、、 计算公式,并列出固定R=320或H=2560时的边界示例,附 BFLOAT16 场景下dx[0]=125的完整调用示例。
🧩 本次 Review 已使用自定义 Skill:


Incorrect?
6 days ago Added label: cann-cla/yes
CANN-robot
6 days ago Comments:
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
/approveor/lgtm- Commenting
/approveimplies 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. 👍


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
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
5 days ago Added label: ci-pipeline-passed
luwei_1104
5 days ago Comments:
5 days ago Comments:
/lgtm
/approve


5 days ago Added label: lgtmapproved
5 days ago Merged pull request
描述
补充 TextGatedResidualGrad 算子 README 和 ACLNN 接口文档
关联的Issue
关联Issue #7267
测试
文档更新
类型标签