Merged
【PR】: pyACL新增Device管理接口适配和rt-kernel接口适配 #5093
wuqifanAdd on Sep 20
【PR】: pyACL新增Device管理接口适配和rt-kernel接口适配 #5093
Merged
Merged fromweixin_46600764/runtimemasterintocann/runtimemaster
Pull Request has been successfully merged by CANN-robot.
(Thank you for wuqifan's contribution.)Sep 20 Added label: enhancement
Sep 20 Associated issue: [Requirement|需求建议]: pyACL新增Device管理接口适配和rt-kernel接口适配
Sep 20 Added label: stat/needs-squash
Sep 20 Added label: cann-cla/yes
CANN-robot
Sep 20 Comments:
Sep 20 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 |
|---|---|---|
| repo-cann/runtime | ✅ 王涛, 卢煜坤 (2/2) | ✅ 卢煜坤, 王涛 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
weixin_46600764, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Sep 20 Set wangtao43,zhangpengpeng8,yanmingxiang,Reyn52166,ykl999,houyanbao,tingwood as approver
Sep 20 Set wangtao43,zhangpengpeng8,yanmingxiang,Reyn52166,ykl999,houyanbao,tingwood as approver
Sep 20 Set wangtao43,zhangpengpeng8,yanmingxiang,Reyn52166,ykl999,houyanbao,tingwood as approver
Sep 20 Set wangtao43,zhangpengpeng8,yanmingxiang,Reyn52166,ykl999,houyanbao,tingwood as approver
wuqifan
Sep 20 Comments:
Sep 20 Comments:
/compile


Sep 20 Pre merge succeeded (commit_id: 8bc3cffab3182b22a2c3536085f9bd139ef7b5f1)
CANN-robot
Sep 20 Comments:
Sep 20 Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


Sep 20 Added label: ci-pipeline-running
Sep 20 Modify description of pull request
Sep 20 Modify description of pull request
Sep 20 Removed label: ci-pipeline-running
Sep 20 Added label: ci-pipeline-passed
ykl999
Sep 20 Comments:
Sep 20 Comments:
/approve
/lgtm


Sep 20 Added label: approved
wangtao
Sep 21 Comments:
Sep 21 Comments:
/approve


Sep 21 Added label: lgtm
Sep 21 Merged pull request
Pull Request
描述
本提交新增 pyACL 对 Device Limit 管理接口和 Host Args Kernel 下发接口的适配,使 Python 用户能够调用对应的 AscendCL Runtime 能力。
主要变更如下:
新增以下 3 个 pyACL 接口:
acl.rt.device_set_limitacl.rt.device_get_limitacl.rt.launch_kernel_with_host_args新增 Device Limit 接口封装:
device_set_limit完成 Limit 类型和配置值的 Python 参数解析,并调用aclrtDeviceSetLimit。device_get_limit调用aclrtDeviceGetLimit,向 Python 层返回配置值和 ACL 错误码。新增 Host Args Kernel 接口封装:
aclrtLaunchKernelCfg和aclrtLaunchKernelAttr。addrOffset、dataOffset转换为aclrtPlaceHolderInfo。aclrtLaunchKernelWithHostArgs完成 Kernel 下发。本次变更仅新增 Python 接口适配,不修改底层 AscendCL Runtime 接口语义。
变更类型
请选择本次引入的变更类型:
关联的Issue
#1001
如何测试
描述测试此变更的步骤和前提条件:
device_set_limit和device_get_limit的设置、查询结果符合预期。launch_kernel_with_host_args能够正确解析 Kernel 配置、Host Args 和 PlaceHolder 参数并完成 Kernel 下发。核对清单
其他信息
在此添加任何其他关于本次 PR 的说明。