已关闭
[Bug-Report|缺陷反馈]: aclnnKthvalue 示例参数及文档索引类型不一致 #5690
黄晓彬创建于  9月8日关闭于  9月10日
黄晓彬成员
9月8日 创建

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

Describe the current behavior / 问题描述 (Mandatory / 必填)

aclnnKthvalue 文档和独立示例的 dim、k 使用 uint64_t,与接口的 int64_t 参数类型不一致;文档示例将 ACL_INT64 索引输出按 float 拷贝和打印,导致索引结果读取错误。

Environment / 环境信息 (Mandatory / 必填)

代码仓:cann/ops-nn,master 分支。硬件和 CANN 运行环境未提供,本次根据源码确认问题。

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

  1. 查看 index/gather_v2/docs/aclnnKthvalue.md 和 examples/test_aclnn_kthvalue.cpp 中 dim、k 的声明。
  2. 查看文档示例中 indicesData 的类型、aclrtMemcpy 拷贝长度和索引打印格式,可见与 ACL_INT64 输出不一致。未执行上板复现。

Describe the expected behavior / 预期结果 (Mandatory / 必填)

dim、k 使用 int64_t,并以 dim=-1 展示负轴用法;文档中的索引数据使用 int64_t 存储,按 sizeof(int64_t) 拷贝并以整数格式打印。

源码差异可见提交 b47181c4aa4d4a3f5c8b57ac9cd21a6ea89b8afc;无运行日志或截图。

Special notes for this issue/备注 (Optional / 选填)

历史 Issue #4716 已关闭,处理独立示例的索引类型;本次补正文档索引读取,并统一文档和独立示例的参数类型。

likedislike
黄黄晓彬成员
9月8日 添加了label:bug-report
黄黄晓彬成员
9月8日 关联了pull request:fix(gather_v2): 修正 Kthvalue 示例参数及索引类型
黄黄晓彬成员
9月8日 关联了pull request:[9.2.0] fix(gather_v2): 修正 Kthvalue 示例参数及索引类型
CANN-robotCANN-robot成员
9月10日 关闭了 issue
CANN-robotCANN-robot成员
9月10日 添加了label:resolved