Closed
Python Profiling 的 index 参数说明与返回值不一致 #1167
KaranocaVeAdd on  Oct 20Closed at  Oct 28
KaranocaVe
KaranocaVe
Oct 20 Create

Python Profiling 的 index 参数说明与返回值不一致

现象

Python Profiling 文档中的 get_op_start、get_op_end、get_op_duration 和 get_model_id 页面都把 index 描述为获取算子名称,但这些接口分别返回开始时间、结束时间、执行耗时和模型 ID。

复现

查看上述四个接口的参数表,核对 index 描述与对应接口的返回值。

预期

index 应说明查询哪一条算子记录,并与函数实际返回的字段一致。

实际

四个页面都把 index 说成查询算子名称,与开始时间、结束时间、执行耗时和模型 ID 的返回值不符。

影响

用户依照文档无法准确理解这些查询函数中 index 指向的记录与返回值的关系,尤其会误以为 start/end/duration/model ID 查询的是名称。该问题仅涉及文档参数语义,不改变 ABI 或运行时行为。

修复

分别将四个页面的 index 说明改为对应算子的开始时间、结束时间、执行耗时或所在模型 ID,并保留已有索引范围。

验证

  • 验证通过:对照公开 C API 声明和 Python wrapper,确认四个 index 分别对应开始时间、结束时间、执行耗时或模型 ID。

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

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

/assign

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

你好,相关pyacl资料问题我们已收到,将会尽快check该问题。

likedislike
ykl999
ykl999Collaborators
Oct 28 Comments:

你好,修正 Python Profiling index 参数说明的pr已合入,issue关闭处理

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