Merged
fix: correct gather_pa_kv_cache example docs #11610
fix: correct gather_pa_kv_cache example docs #11610
Merged
王超Add on Sep 9
王超
王超Collaborators
Sep 9

描述

修复gather_pa_kv_cache: 示例代码错误且 aclnn 返回码表格 rowspan 不匹配

关联的Issue

关联Issue: #5131

测试

蓝区编译门禁

文档更新

更新 attention/gather_pa_kv_cache/docs/aclnnGatherPaKvCache.md 文档及示例代码。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for 王超's contribution.)
王超王超Collaborators
Sep 9 Created pull request, commit 73b982aa
王超王超Collaborators
Sep 9 Associated issue: [Documentation|文档问题]: gather_pa_kv_cache: 示例代码错误且 aclnn 返回码表格 rowspan 不匹配
atomgit-bot
atomgit-bot
Sep 9 Comments:

变更摘要

本 PR 为文档修复类变更,针对 gather_pa_kv_cache 算子的示例代码与文档进行修正。示例文件 test_aclnn_gather_pa_kv_cache.cpp 中修复了多处示例代码错误(包括 cacheMode 声明方式、错误的日志文本、结果拷贝大小等),并统一了代码格式;同时按 PR 描述更新了 attention/gather_pa_kv_cache/docs/aclnnGatherPaKvCache.md 文档,修复 aclnn 返回码表格 rowspan 不匹配的问题。

主要改动

  • 示例代码错误修复: 将 cacheMode 的声明由 char* 改为 char cacheMode[];将第二段接口失败日志中的错误文本 aclnnUnfoldGrad 更正为 aclnnGatherPaKvCache;将结果拷贝大小由固定值 256 改为基于 keyShape 计算的 GetShapeSize(keyShape),使示例与实际张量形状一致。
  • 注释与格式修正: 将创建 tensor 处的注释由“创建 gradOut aclTensor”更正为“创建 GatherPaKvCache 的输入输出 aclTensor”,并统一了缩进格式、补全文件末尾换行。
  • 文档更新: 更新 aclnnGatherPaKvCache.md,修复其中 aclnn 返回码表格 rowspan 不匹配的问题(依据 PR 描述)。
likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Sep 9 Added label: stat/needs-squash
CANN-robotCANN-robotCollaborators
Sep 9 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Sep 9 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
*/*/docs/acl*.md ✅ 陈娇, 袁滔, juyangokok, L_Euler (4/2) ✅ 陈娇 (1/1)
attention ✅ juyangokok, L_Euler (2/2) ✅ juyangokok, L_Euler (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
王超王超Collaborators
Sep 9 Modify description of pull request
6 event messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
Sep 9 Removed label: stat/needs-squash
CANN-robot
CANN-robotCollaborators
Sep 9 Comments:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): stat/needs-squash.

likedislike
CANN-robotCANN-robotCollaborators
Sep 9 Added label: cann-cla/yes
王超
王超Collaborators
Sep 9 Comments:

compile

likedislike
王超王超Collaborators
Sep 9 Pre merge succeeded (commit_id: 5c66ac8e8cf69ec1425ecda225b8ee76d681cead)
CANN-robot
CANN-robotCollaborators
Sep 9 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 9 Added label: ci-pipeline-running
7 event messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
Sep 9 Added label: cann-cla/yes
王超
王超Collaborators
Sep 9 Comments:

compile

likedislike
王超王超Collaborators
Sep 9 Pre merge succeeded (commit_id: 41887a5466fe3eb13018fada867f5c3ecbb40fb7)
CANN-robot
CANN-robotCollaborators
Sep 9 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 9 Removed label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
Sep 9 Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 9 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 9 Added label: ci-pipeline-passed
chenjiao
chenjiaoCollaborators
Sep 9 Comments:

/approve

likedislike
claire8090
claire8090Collaborators
Sep 9 Comments:

/lgtm

likedislike
鞠阳
鞠阳Collaborators
Sep 9 Comments:

/approve
/lgtm

likedislike
CANN-robotCANN-robotCollaborators
Sep 9 Added label: approved
Han-Xiaobin
Han-XiaobinCollaborators
Sep 9 Comments:

/approve
/lgtm

likedislike
CANN-robotCANN-robotCollaborators
Sep 9 Added label: lgtm
CANN-robotCANN-robotCollaborators
Sep 9 Closed associated issue
CANN-robotCANN-robotCollaborators
Sep 9 Merged pull request