Closed
docs(runtime): 修正 Python 模型输出查询接口参数说明 #1250
KaranocaVeAdd on  Oct 22Closed at  Oct 28
KaranocaVe
KaranocaVe
Oct 22 Create

docs(runtime): 修正 Python 模型输出查询接口参数说明

问题

Runtime Python API 参考手册中,七个模型输出查询接口的参数说明沿用了输入语义:数据类型、Format、名称及维度查询把 index 说成输入序号或输入大小;按名称查询输出索引的 name 被写成输入名称;动态输出大小被描述为输入大小。两类输出维度查询的长名称映射格式也误写为 _input_。
这些说明与接口名、功能说明以及 Python 包装层实际调用的 aclmdlGetOutput* 接口不符。

影响

照文档操作时,调用者可能按输入编号读取输出元数据、用输入名称查询输出索引,或按输入大小预估输出缓冲区。

修复

仅更正上述七页中的输入/输出措辞和输出维度名称前缀,不改变接口实现或运行时行为。

验证

  • 静态文档核对通过:七个输出查询页面已统一为输出语义,两处长名称映射使用 _output_ 前缀。
  • Runtime Python 包装调用、C API 文档及 Host UT 断言确认修正符合输出查询契约;接口实现未改。
  • 目标仓库限定于七个修改文档的 OAT pre-commit 检查通过。

关联 PR: https://gitcode.com/cann/runtime/merge_requests/5801

likedislike
KaranocaVeKaranocaVe
Oct 22 Associated pull request
KaranocaVeKaranocaVe
Oct 22 Modify description of issue
wuqifan
wuqifan
Oct 22 Comments:

/assign

likedislike
CANN-robotCANN-robotCollaborators
Oct 22 Assign weixin_46600764 as responsible person
wuqifan
wuqifan
Oct 22 Comments:

感谢提出的资料问题反馈!根据提供的信息核实:获取模型输出数据类型、Format、名称、维度、输出大小以及按名称查输出索引这几页,参数与返回值说明沿用了输入语义;其中 index 和 name 指的都是输出,输出维度长名称的前缀也应是 output。按现有说明,调用者容易用输入编号或输入名称去取输出元数据,或按输入大小预估输出缓冲区。我们会在审核后尽快推进合入!

likedislike
ykl999
ykl999Collaborators
Oct 28 Comments:

你好,修正 Python 模型输出查询接口参数说明已经合入,issue关闭处理

likedislike
ykl999ykl999Collaborators
Oct 28 changed custom state from 进行中 to 已解决
ykl999ykl999Collaborators
Oct 28 Close issue
CANN-robotCANN-robotCollaborators
Oct 28 Added label: resolved