已合并
LogAddExp 新增 Ascend950 AscendC 算子实现 #3150
zhangqijia1创建于 6月5日
LogAddExp 新增 Ascend950 AscendC 算子实现 #3150
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhangqijia1 的贡献)6月5日 创建了 pull request,commit ce3dcb61
6月5日 关联了issue:[Requirement|需求建议]: LogAddExp 算子新增 Ascend950 AscendC 实现
6月5日 添加了label:cann-cla/yes
CANN-robot
6月5日 评论:
6月5日 评论:
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 |
|---|---|---|
| */*/op_api/*.h | ✅ 汤磊, 宋凯, 冯彤 (3/2) | ✅ 汤磊 (1/1) |
| */*/op_host/*_def.cpp | ✅ 汤磊, 宋凯, 冯彤 (3/2) | ✅ 汤磊 (1/1) |
| math/log_add_exp | ✅ 宋凯, 唐燕峰, 冯彤 (3/2) | ✅ 宋凯, 唐燕峰 (2/1) |
| repo-cann/ops-math | ✅ 宋凯, 冯彤 (2/2) | ✅ 宋凯 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
gcw_SUaZx3UQ, thanks for your pull request. All authors of the commits have signed the CLA. 👍


6月5日 修改了pull request 的描述
此处折叠了100条消息 查看更多
6月8日 添加了label:approved
6月8日 添加了label:lgtm
6月8日 关闭了关联的issue
6月8日 合入了pull request
描述
为 LogAddExp 算子新增 Ascend950(arch35)的 AscendC 算子实现,复用同一 kernel 通过 base/scale/shift 属性同时支持 aclnnLogAddExp(base=-1,自然对数)与 aclnnLogAddExp2(base=2)。
主要改动:
log_add_exp_apt.cppkernel 入口,按 schMode/formulaType 分发 simplified/full 两套公式 × native/cast 两条数据路径;arch35/log_add_exp_dag.h实现数值稳定公式y = max(x1,x2) + ln(1 + exp(-|x1-x2|))(full 路径叠加 base/scale/shift),并通过 InfGuardedSub 处理 x1、x2 同为 +inf/-inf 时 inf-inf=NaN 的污染(与 910B after_v200 分支行为对齐);bf16 走 cast-to-float 路径。支持数据类型:FP16 / FP32 / BF16,支持 broadcast。
关联的Issue
#1868
测试
文档更新
无
类型标签