Closed
PyACL Profiling `range_stop` 文档原型参数错误 #1189
KaranocaVeAdd on Oct 21Closed at Oct 23
Oct 21 Associated pull request
Oct 21 Modify description of issue
wuqifan
Oct 21 Comments:
Oct 21 Comments:
/assign


Oct 21 Assign weixin_46600764 as responsible person
wuqifan
Oct 21 Comments:
Oct 21 Comments:
感谢反馈!您所提的pyacl文档问题已收到,根据提供的信息核实:function-range_stop.md 的 C 原型确实写成了 aclprofRangeStop(uint32_t *rangeId),与 acl_prof.h 中的 aclprofRangeStop(uint32_t rangeId) 不一致;同目录 range_start 的指针参数与头文件一致,无需调整。我们会尽快推进合入!


ykl999
Oct 23 Comments:
Oct 23 Comments:
pr已合入,issue关闭处理


Oct 23 changed custom state from 进行中 to 已解决
Oct 23 Close issue
Oct 23 Added label: resolved
PyACL Profiling
range_stop文档原型参数错误现象
固定版本
cann/runtime@a57f46573ce412214b0ba34895f55ff8214735c9的 Python API 页面python/docs/zh/api_ref/runtime/Profiling/function-range_stop.md将 C 原型写为aclprofRangeStop(uint32_t *rangeId)。公开头文件和实现均声明并接收uint32_t rangeId值。使用文档原型编写 C++ 调用会因指针不能转换为整数而编译失败。证据
rangeId写成指针。include/external/acl/acl_prof.h声明aclprofRangeStop(uint32_t rangeId);同仓库 C API 参考docs/zh/api_ref/19-02_msproftx_extension_apis.md也采用值参数。python/pyACL/prof/prof_wrap.cpp以uint32_t解析 Python 参数,并将该整数按值传入 C API。修复
仅将 Python Profiling API 页面 C 原型中的
uint32_t *rangeId改为uint32_t rangeId。Python 调用形式和运行时代码无需修改。验证
关联 PR: https://gitcode.com/cann/runtime/merge_requests/5716