Pull Request已成功合入, 合并人@CANN-robot
(感谢 hahaha22 的贡献)变更摘要
此 PR 对 4 个算子(unique_consecutive、sync_batch_norm_gather_stats、swiglu_mx_quant、swiglu_mx_quant_with_dual_axis)的 arch35 kernel 实现进行 AscendC API 系统性重命名,共涉及 7 个文件,增删各 333 行。变更范围覆盖地址空间限定符、数据搬运、归约、比较、掩码操作等多类 API,属于纯粹的重构操作,二进制一致性已验证通过。
主要改动
-
数据搬运 API 语义化重命名:
MicroAPI::DataCopy按加载/存储方向拆分为MicroAPI::LoadAlign(加载)和MicroAPI::StoreAlign(存储);MicroAPI::DataCopyUnAlign、MicroAPI::DataCopyUnAlignPre、MicroAPI::DataCopyUnAlignPost同样按方向分别重命名为MicroAPI::LoadUnAlign/MicroAPI::LoadUnAlignPre、MicroAPI::StoreUnAlign/MicroAPI::StoreUnAlignPost,并在尾部操作中新增零填充参数。 -
地址空间限定符重命名: 所有
__local_mem__指针声明统一替换为__ubuf__,涉及unique_consecutive_helper.h、两个sync_batch_norm_gather_stats文件以及swiglu_mx_quant_common.h中大量函数参数与局部变量。 -
归约操作 API 模板化:
MicroAPI::ReduceSum替换为MicroAPI::Reduce<ReduceType::SUM>,MicroAPI::ReduceMaxWithDataBlock替换为MicroAPI::ReduceDataBlock<ReduceType::MAX>,使归约操作类型通过模板参数显式指定。 -
比较与掩码逻辑操作重命名:
MicroAPI::CompareScalar重命名为MicroAPI::Compares;MicroAPI::MaskAnd和MicroAPI::MaskOr分别简化为MicroAPI::And和MicroAPI::Or;MicroAPI::MaskUnPack和MicroAPI::MaskPack分别简化为MicroAPI::UnPack和MicroAPI::Pack。这些变更主要出现在swiglu_mx_quant_common.h和swiglu_mx_quant_with_dual_axis_regbase.h的量化计算路径中。 -
寄存器类型细化:
MicroAPI::UnalignReg拆分为MicroAPI::UnalignRegForLoad和MicroAPI::UnalignRegForStore,用于非对齐数据搬运时区分加载/存储方向的寄存器声明;MicroAPI::GatherMask重命名为MicroAPI::Squeeze。这些变更主要出现在unique_consecutive_helper.h的唯一值收集函数中。


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
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| index | ✅ 汤平川, 陈风, 陈琦 (3/2) | ✅ 汤平川, 陈风 (2/1) |
| norm | ✅ 汤平川, 陈琦 (2/2) | ✅ 汤平川 (1/1) |
| quant | ✅ 陈琦, 陈风, 汤平川 (3/2) | ✅ 陈风, 汤平川 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
hahaha22, thanks for your pull request. All authors of the commits have signed the CLA. 👍


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.


Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


描述
对 4 个算子的 arch35 kernel 实现进行 AscendC MicroAPI 接口重命名,以同步 AscendC SDK 新版本的 API 命名规范。
改动原因
AscendC SDK 新版本对 MicroAPI 接口命名进行了系统性调整(地址空间限定符统一、加载/存储方向接口拆分、Mask 相关接口去前缀化等),算子代码需同步更新以使用新 API 名称,旧名称将在后续版本废弃。
改动方法
纯机械重命名,不涉及任何逻辑变更。共修改 7 个文件,333 行增 + 333 行删(一一对应替换)。
涉及算子(4 个)
变更文件列表(7 个)
API 改名映射
__local_mem____ubuf__MicroAPI::DataCopy(加载)/ 裸DataCopyMicroAPI::LoadAlign/LoadAlignMicroAPI::DataCopy(存储)MicroAPI::StoreAlignMicroAPI::DataCopyUnAlign(加载)MicroAPI::LoadUnAlignMicroAPI::DataCopyUnAlign(存储)MicroAPI::StoreUnAlignMicroAPI::DataCopyUnAlignPreMicroAPI::LoadUnAlignPreMicroAPI::DataCopyUnAlignPostMicroAPI::StoreUnAlignPostMicroAPI::CompareScalarMicroAPI::ComparesMicroAPI::MaskAndMicroAPI::AndMicroAPI::MaskUnPackMicroAPI::UnPackMicroAPI::MaskPackMicroAPI::PackMicroAPI::GatherMask(函数)MicroAPI::SqueezeMicroAPI::UnalignRegMicroAPI::UnalignRegForLoad/MicroAPI::UnalignRegForStore关联的Issue
测试
文档更新
无。本次为纯 API 重命名,不涉及接口语义或使用方式变化。
类型标签
AI/Agent生成声明