Pull Request已成功合入, 合并人@CANN-robot
(感谢 cellur_z 的贡献)变更摘要
该 PR 将 CCU 的句柄、Channel 快照与资源描述符整体对齐到 POD ABI 定档口径:CcuInsHandle 由 uint64_t 升级为带 CommAbiHeader 的结构体;HcommCcuRegisterContextPod 重构为按 die × 资源类型嵌套的 HcommCcuInstance,控制面函数表并入 ascCustom 槽位数组;Channel POD 升级到 v4(16 槽 + 有效计数 + RegedBufferEntity 远端 buffer);指令空间改为经 ascCustom 接口向 hcomm 按需申请与下发,不再走本地 range 池与自管理设备内存;同时删除旧的 host launch 实现,新增 ResDesc 资源描述符查询链,并配套调整设备号获取方式(aclrtGetDevice)与全部相关示例/单元测试。
主要改动
- CCU Instance 句柄与注册上下文 POD 定档:
CcuInsHandle从uint64_t改为 32 字节结构体(header/ccuInsKey/ccuInsPtr,0 键为无效句柄),HcommCcuRegisterContextHandle更名HcommCcuInstanceHandle,hcomm_ccu_res.h中的 POD 重构为HcommCcuResRange/HcommCcuResRanges/HcommCcuDieMetadata/HcommCcuDieRes/HcommCcuInstance两级嵌套结构,HcommCcuDieMetadata携带RegedBufferEntity ccuResBuffer与唯一loopChannelId(die 内/间共用);各示例alg_resource.cc与asccomm_ccu_kernel_register_start签名同步切换,ccu_kernel_registry_mgr的实例表改以ccuInsKey为键。 - Channel POD 升级 v4 并按有效数量校验:
HcommCcuChannelPodABI 版本升至 4、资源槽容量扩至 16、尺寸固定 544 字节,字段改名(localVarIds/remoteEventIds/localEventMasks等),远端 CCU buffer 折叠为rmtCcuResBuffer,ccu_channel::init经ascCustom槽 0HcommCcuGetChannelEntityFn取借用指针并深拷贝,get_id_by_array按localVarNum等有效数量(而非定长容量)校验下标。 - 指令空间与下发链路重构: INS 不再进入
asc_ccu_res_repository.instructionrange 池,改由ascCustom槽 1allocInstSpace按需切分;ccu_kernel_mgr::load_instruction删除自管理的instruction_load_dev_mem_及aclrtMalloc/Memcpy路径,改为调用槽 2submitInsts直接传 host 指令数据,HcommCcuInstructionLoadPod随之删除。 - 控制面函数表删除与 DFX 降级:
HcommCcuControlOpsPod删除,hcomm_ccu_control.h降级为转发头,线程级set_current_ccu_device_logic_id移除、设备号改由aclrtGetDevice即时获取;ccu_dfx.cc因 mission/loop/CKE/XN/GSA 硬件现场查询未注入ascCustom(槽 3-7 预留)而整体降级返回CCU_E_NOT_SUPPORT,资源值查询恒返回UINT64_MAX。 - 新增 ResDesc 查询链并删除 host launch: 新增
hcomm_ccu_res_desc.h与ccu_res_desc_c_adpt.cc,实现HcommCcuResDescPOD、handle table(HcommCcuInsResDescCreate/Destroy/QueryDieId/SetNum/QueryNum/Query)及HcommCcuKernelQueryResReq(执行 kernel func 统计资源需求,block/非 block 合并计数);同时删除ccu_host_launch.h/.cpp、asccomm_ccu_host_kernel_launch及对应 UT,并补充aclrtGetDevice桩。


🤖 AI 代码检视正在进行中,请稍候…


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 |
|---|---|---|
| examples | ✅ changxianyu, DragonBornHD84 (2/2) | ✅ changxianyu (1/1) |
| include | ✅ zhanghao_0689, changxianyu, DragonBornHD84 (3/2) | ✅ zhanghao_0689 (1/1) |
| src | ✅ changxianyu, DragonBornHD84 (2/2) | ✅ changxianyu (1/1) |
| tests | ✅ changxianyu, DragonBornHD84 (2/2) | ✅ changxianyu (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
zhao_lulu, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/approve


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: DragonBornHD84


当前PR是否有AI参与:
[x] 否
[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :
PR功能描述 / 为什么需要这个合入**:
该PR关联的issue
(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #27
希望检视人员了解:
改动类型 / Change Type
测试信息 / Testing
检查清单 / Checklist