Merged
fix: align AICPU entity ABI with hcomm #268
ca1kwAdd on 25 days ago
fix: align AICPU entity ABI with hcomm #268
Merged
ca1kwAdd on 25 days ago
ca1kw
ca1kw
25 days ago

当前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

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for ca1kw's contribution.)
ca1kwca1kw
25 days ago Created pull request, commit 8a8f5c51
atomgit-bot
atomgit-bot
25 days ago Comments:

变更摘要

本变更主要针对 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 偏移校验。
likedislike
Incorrect?
CANN-robot
CANN-robotCollaborators
25 days ago Comments:

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.

likedislike
atomgit-bot
atomgit-bot
25 days ago Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
25 days ago Added label: cann-cla/yes
194 messages are collapsed here。 See more
chenmaCollaborators
16 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
16 days ago Added label: lgtmapproved
CANN-robot
CANN-robotCollaborators
16 days ago Comments:

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.

likedislike
pandengpandengCollaborators
16 days ago Resolved final issue
CANN-robotCANN-robotCollaborators
16 days ago Merged pull request