Pull Request已成功合入, 合并人@CANN-robot
(感谢 ca1kw 的贡献)变更摘要
本变更主要针对 include/aicpu/hcomm/hcomm_res_entity_defs.h,目的是使 AICPU 侧的资源实体 ABI 布局与 hcomm 保持一致。核心做法是取消 #pragma pack(push, 4)/#pragma pack(pop) 的 4 字节强制对齐,改为默认 8 字节对齐,并相应调整 ChannelEntity、ThreadEntity、HcommCqContext 的字段顺序与预留空间,使结构体大小、对齐及关键字段偏移符合固定 256 字节 ABI 的约定。
主要改动
- 取消 4 字节强制打包: 移除
#pragma pack(push, 4)与#pragma pack(pop),使实体按默认 8 字节对齐,与 hcomm 对齐方式一致。 - 调整
ChannelEntity字段布局: 将devInfo从protocol之后移动到cqContextAddr之后,并新增uint8_t reserve[112]预留扩展空间以填满固定的 256 字节 ABI。 - 调整
ThreadEntity字段布局: 将devInfo移动到originThreadHandle之后,预留字段由raw[172]改为raw[168]以适配新的对齐与字段顺序。 - 修正
HcommCqContext预留空间:roceCq的raws由124改为120,配合对齐变化保持结构体大小稳定。 - 强化 ABI 静态断言校验: 将
ChannelEntity大小约束由<=改为==,对齐断言由4改为8,并新增针对localNotifyNum、localNotifyAddr、sqContextAddr、devInfo、originChannelHandle等字段的offsetof偏移校验。


Hi @ca1kw, welcome to submitting your first PR to asc-comm!
PR Merge Steps
1. CLA Signing
If the current PR label includes cann-cla/yes, it means you have signed the CLA and can proceed to the next step. If the label includes cann-cla/no, please sign the CLA first. If you have any questions, please refer to the FAQ.
2. CI Check
Please comment /compile to trigger the CI pipeline check. If the CI run is successful, the PR will be tagged with ci-pipeline-passed and you can proceed to the next step. If the CI run fails, the PR will be tagged with ci-pipeline-failed, please check the CI logs to fix the issues in the PR. If you have any questions, please refer to the FAQ.
3. Code Review
After CI passes, please refer to the PR Approval Progress and proactively @ the committers in the table to review the code. After approval, committers will comment /lgtm and /approve. Once the lgtm and approved labels are successfully added, the PR will be merged automatically.


The MR can not be merged, because of CodeReview discussion not resolved
If you want to solve this problem, you can click here to do it in the FAQs.


当前PR是否有AI参与:
[x] 否
[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :
PR功能描述 / 为什么需要这个合入**:
hcomm仓评审后POD有所修改,本pr修改asc-comm仓中对应的pod接口文件,和hcomm仓中保持一致,并对代码进行相应适配。
该PR关联的issue
(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #
resolves#93
希望检视人员了解:
改动类型 / Change Type
测试信息 / Testing
检查清单 / Checklist