Pull Request已成功合入, 合并人@CANN-robot
(感谢 liangyuhua 的贡献)变更摘要
此 PR 仅修改 norm/add_rms_norm_cast/docs/aclnnAddRmsNormCast.md 文档,修正 aclnnAddRmsNormCast 计算公式中 y1Out 与 y2Out 的计算顺序,使其与 kernel 实际实现(add_rms_norm_cast_regbase_common.h)保持一致:先在 float32 上计算 RmsNorm 得到 y1Out,再 cast 到 b16 得到 y2Out。同步更新了两个输出参数的中文描述,属纯文档变更,不涉及代码逻辑。
主要改动
- 计算公式顺序修正:将原文档中
y1Out = float(y2Out)的错误写法改为x_i = float(x1) + float(x2)→y1Out = RmsNorm(x_i)→y2Out = cast(y1Out),明确y1Out为 float32 的 RmsNorm 结果、y2Out为其 cast 结果。 y1Out参数描述更新:描述由「归一化后经过类型转换」改为「归一化后的」,强调y1Out是 RmsNorm 的主结果。y2Out参数描述更新:描述由「归一化后的」改为「归一化后经过类型转换」,强调y2Out是类型转换后的结果。


🤖 本次改动均为数据 / 生成 / 二进制文件(如测试用例、锁文件、媒体资源),没有可审查的代码逻辑,已跳过 AI 代码审查。


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
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 |
|---|---|---|
| */*/docs/acl*.md | ✅ 吴瑶, 汤平川 (2/2) | ✅ 吴瑶 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
liangyuhua, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


流水线任务触发成功
任务链接 [f9f73ebf5fda434eab12b70456a0a815][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_classify | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_mobile_station_9030_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> | |
| UT_Test_report_lcov | ⚠️ WARNING | >>>>> |
[2026-08-14 10:27:06] CI执行结束


流水线任务触发成功
任务链接 [181d1fa0a9254a5a9a69b7cf39b66bdb][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_checkpr | ✅ SUCCESS | ||
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_precommit | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> |
[2026-08-14 10:16:16] CI执行结束


/lgtm
/approve


描述
修正
aclnnAddRmsNormCast.md文档中计算公式的 y1Out/y2Out 计算顺序错误,使其与 kernel 实际实现一致。当前文档公式写为
y1Out = float(y2Out),即先算 y2Out(b16 RmsNorm 结果)再 cast 到 y1Out(float32)。但实际 kernel 实现(add_rms_norm_cast_regbase_common.h:172-179)是先在 float32 上算出 RmsNorm 结果 y1Out,再 cast 到 b16 得到 y2Out。修改内容:
x_i = float(x1) + float(x2)→y1Out = RmsNorm(x_i)→y2Out = cast(y1Out)归一化后经过类型转换→归一化后的(y1Out 是 RmsNorm 主结果)归一化后的→归一化后经过类型转换(y2Out 是 cast 结果)关联的Issue
关联 Issue #4796:https://gitcode.com/cann/ops-nn/issues/4796
测试
文档更新
更新了
norm/add_rms_norm_cast/docs/aclnnAddRmsNormCast.md的计算公式和参数说明描述。类型标签
AI/Agent生成声明