已合并
部分算子vf整改 #8979
部分算子vf整改 #8979
已合并
xieshengwei1024创建于 17 天前
xieshengwei1024成员
17 天前

描述

整改vf接口

关联的Issue

测试

已验证,修改后二进制未变化

文档更新

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 xieshengwei1024 的贡献)
Xxieshengwei1024成员
17 天前 创建了 pull request,commit 2f0d14d3
atomgit-bot
atomgit-bot
17 天前 评论:

变更摘要

该 PR 为 AscendC 向量接口(vf 接口)的整改与重命名重构(源分支 refactor/rename-ascendc-api),不涉及业务逻辑调整,PR 描述声明"修改后二进制未变化"。改动主要针对 arch35 下多个算子的内核实现,将旧版 API 统一替换为新版接口:DataCopy 按读写方向拆分为 LoadAlign/StoreAlignReduceSum/ReduceMax/ReduceMin 统一为带模板参数的 Reduce<ReduceType::...>CompareScalar 改为 ComparesReduceMaxWithDataBlock 改为 ReduceDataBlock<ReduceType::MAX>MaskNot/MaskAnd 改为 Not/And,并将 __local_mem__ 指针标注统一更正为 __ubuf__

主要改动

  • 规约接口统一为 Reduce<ReduceType::...>:在 swiglu_group_base.hswiglu_group_quant_base.hforeach_norm_regbase.hforeach_non_finite_check_and_unscale_regbase.h 中,将 ReduceSumReduceMaxReduceMin 分别替换为 Reduce<ReduceType::SUM>Reduce<ReduceType::MAX>Reduce<ReduceType::MIN>,将 ReduceMaxWithDataBlock 替换为 ReduceDataBlock<ReduceType::MAX>
  • 数据搬移接口按读写拆分:在 foreach_addcmul_scalar_regbase.hforeach_mul_scalar_list_regbase.hforeach_non_finite_check_and_unscale_regbase.hforeach_norm_regbase.hsigmoid_cross_entropy_with_logits_v2_dag.h 中,将双向的 DataCopy 替换为读方向 LoadAlign、写方向 StoreAlign,并保留 PostLiteral::POST_MODE_UPDATEStoreDist::DIST_FIRST_ELEMENT_B32LoadDist::DIST_BRC_B32 等原有模式参数。
  • 寄存器比较与掩码接口改名:在 swiglu_group_quant_base.h 中,CompareScalar<uint16_t, CMPMODE::GT/LT> 改为 Compares<uint16_t, CMPMODE::GT/LT>MaskAnd 改为 AndMaskNot 改为 Not,函数语义与调用参数保持一致。
  • UB 指针标注统一为 __ubuf__:在多个 foreach_*group_norm_silu 系列的 regbase/welford 头文件(如 group_norm_silu_regbase_two_pass.hgroup_norm_silu_regbase_welford_generalized.h 等)中,将指向 UB 内存的 __local_mem__ 指针声明及 GetPhyAddr() 处的强转统一改为 __ubuf__
likedislike
atomgit-bot
atomgit-bot
17 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
17 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
17 天前 评论:

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
activation 钱泽洪, 汤平川 (2/2) 钱泽洪, 汤平川 (2/1)
foreach 汤平川, 钱泽洪 (2/2) 钱泽洪, 汤平川 (2/1)
loss 汤平川, 钱泽洪 (2/2) 汤平川, 钱泽洪 (2/1)
norm 汤平川, 钱泽洪 (2/2) 钱泽洪, 汤平川 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

xieshengwei1024, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
此处折叠了95条消息 查看更多
qianzehong成员
11 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
11 天前 添加了label:approved
TangPC
TangPC成员
11 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
11 天前 添加了label:lgtm
CANN-robotCANN-robot成员
11 天前 合入了pull request