Merged
docs: 修正算子接口文档中的表述问题 #15771
docs: 修正算子接口文档中的表述问题 #15771
Merged
周云飞Add on 17 days ago
周云飞
周云飞Collaborators
17 days ago

描述

修正算子文档中的接口参数名、公式符号、示例变量、文字和排版问题,并核对相关中英文文档。

  • #7410:对照接口实现修正 MlaPrologV3WeightNz 的参数和可选输出说明,同步中英文文档。
  • #7413:对照接口和参考实现修正 NormRopeConcat 的公式、布局说明及中英文文档。
  • #7425:修正稀疏索引说明和公式中的数学标记。
  • #7434:修正中间变量拼写。原有公式中 sharedExpertX 与 expertScales 的计算关系还需算子侧确认。
  • 同步相关英文文档的参数名、公式、示例和术语,修正 Combine V3 英文公式,并规范中英文描述。

同步 master 后,#7429、#7430、#7435 对应问题已由上游 PR #15715 修复,保留上游修改。

按门禁反馈回退了三个缺少 UT 的算子文档改动,并同步 sparse_lightning_indexer 的中英文 README。

关联的Issue

#7379、#7380、#7381、#7382、#7383、#7384

#7385、#7386、#7388、#7389、#7391、#7392

#7393、#7394、#7395、#7396、#7397、#7398

#7399、#7400、#7402、#7403、#7404、#7405

#7406、#7407、#7408、#7409、#7410、#7411

#7412、#7413、#7414、#7415、#7416、#7417

#7419、#7420、#7421、#7422、#7423、#7424

#7425、#7426、#7427、#7428、#7429、#7430

#7431、#7432、#7434、#7435、#7437、#7438

#7439、#7440

测试

  • 对照接口定义、代码或参考实现逐项复核问题及相关中英文表述。
  • 100 个修改的 Markdown 文件通过差异空白检查,并检查代码围栏和 HTML 表格标签的平衡变化。
  • 修改行中的 7 个本地相对链接均可找到目标。
  • 未运行完整 pre-commit、算子编译或 NPU 测试。

文档更新

修正相关算子 API、Torch API 文档和算子列表。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for 周云飞's contribution.)
周云飞周云飞Collaborators
17 days ago Created pull request, commit 1d830748
atomgit-bot
atomgit-bot
17 days ago Comments:

变更摘要

本 PR 为纯文档修正,仅调整算子接口文档(含 aclnn 接口文档、Torch API 文档与算子列表)中的表述问题,使描述与接口定义及上下文保持一致。修改覆盖注意力、FFN、GMM、MC2、MHC、MoE、位置编码等模块,主要涉及参数名拼写统一、公式符号与变量名更正、示例代码变量名对齐、术语规范化(如 PageAttention 统一为 PagedAttention)以及少量排版调整,不涉及任何实现逻辑变更。

主要改动

  • 参数名与接口描述对齐: aclnnFlashAttentionVarLenScoreV5 的可选输入由 sinkInOptional 更正为 sinkOptional,aclnnDenseLightningIndexerGradKLLoss 的空 Tensor 说明改为接口实际使用的 queryIndex、keyIndex、weights,aclnnMlaPrologV3WeightNz 中 dequantScaleQNormOptional 更正为 dequantScaleQNormOutOptional。
  • GMM 示例变量与参数名统一: aclnnGroupedMatmulFinalizeRouting 系列(含 V2/V3、WeightNzV2)示例变量由 shareInputWeight 改为 sharedInputWeight,shareInputLen 改为 sharedInputLen,并同步更新 GetWorkspaceSize 调用处的实参名称。
  • 公式符号修正: 反向计算相关文档将 V、Q、K 更正为 dV、dQ、dK(aclnnFlashAttentionScoreGradV2/V3),aclnnFlashAttentionScoreGradV2 中 Mask 函数的括号位置修正为 Mask(\frac{QK^T}{\sqrt{d}}+pse,atten\_mask);MC2 系列文档中 ataOut 统一改为 dataOut。
  • 术语与拼写规范化: 多个文档中 PageAttention 统一为 PagedAttention、transform 改为 transformer、dquant 改为 dequant、per-tensor 补全连字符,SeqLens参数组 统一为 SeqLengths参数组,aclnnLightningIndexerGrad 示例变量 deteminstic 更正为 deterministic。
  • 输入输出名称与描述纠正: aclnnFusedInferAttentionScoreV4 表格中输出名 attention 改为 attentionOut,aclnnNsaCompressAttentionInfer 错误码说明中 attentionOut 改为 output,aclnnNsaSelectedAttentionInfer 的 attentionOut 说明由"预留参数,暂未使用"改为"用于接收attention计算结果",aclnnSparseFlashMlaGrad 中 outOptional 更正为 out。

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

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
17 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
17 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, 於欣洁 (4/2) ✅ 蔡雯雯, 杨露 (2/1)
*/*/docs/acl*.md ✅ 於欣洁, 蔡雯雯, 杨露, yangzeheng, wang-minbo, kdy18482276080 (6/2) ✅ 蔡雯雯, 杨露 (2/1)
attention ✅ 於欣洁, kdy18482276080 (2/2) ✅ 於欣洁, kdy18482276080 (2/1)
docs ✅ 於欣洁, wang-minbo (2/2) ✅ 於欣洁, wang-minbo (2/1)
mc2 ✅ yangzeheng, wang-minbo (2/2) ✅ wang-minbo (1/1)
posembedding ✅ kdy18482276080, 於欣洁 (2/2) ✅ kdy18482276080, 於欣洁 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
周云飞周云飞Collaborators
17 days ago Associated issue: [Documentation|文档反馈]: flash_attn.md 文档存在 2 处问题需修正
44 messages are collapsed here。 See more
yanglu-1
yanglu-1Collaborators
17 days ago Comments:

/lgtm
/approve

likedislike
kdy18482276080
kdy18482276080Collaborators
17 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
17 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
17 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
17 days ago Merged pull request