已合并
feat:新增对激活做加法、layernorm、clamp的融合算子(#1669) #4116
feat:新增对激活做加法、layernorm、clamp的融合算子(#1669) #4116
已合并
hucongzheng创建于 4月14日
hucongzheng成员
4月14日

描述
新增对激活做加法、layernorm、clamp的融合算子
算子功能:对激活加Bias和残差后做layernorm, 再做clamp。对激活做加法、layernorm、clamp的融合算子。
计算公式: outAdd = x + residual + bias; outLyn = clamp(layernorm(outAdd))

关联的Issue
https://gitcode.com/cann/ops-transformer/issues/1669

测试
测试脚本中测试了BF16和FP16输入下和CPU的精度对比
MoeLayerNormAdd算子测试结果截图 - 副本.png

文档更新
PR中包含一个README.md新增

类型标签
🐛 Bug 修复
[x ] ✨ 新特性
⚡ 性能优化
♻️ 重构
🧪 测试
📦 构建/CI
🔧 配置变更
📝 文档更新
⬆️ 依赖升级
🔒 安全修复
🧹 代码清理
❓ 其他,请描述:

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 hucongzheng 的贡献)
Hhucongzheng成员
4月14日 创建了 pull request,commit 9d334c75
Hhucongzheng成员
4月14日 关联了issue:[Requirement|需求建议]: 新增对激活做加法、layernorm、clamp的融合算子
CANN-robotCANN-robot成员
4月14日 添加了label:stat/needs-squash
CANN-robot
CANN-robot成员
4月14日 评论:

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
experimental/moe 於欣洁, chen-linxin4 (2/2) 於欣洁, chen-linxin4 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
4月14日 添加了label:cann-cla/no
此处折叠了77条消息 查看更多
於欣洁成员
6月8日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月8日 添加了label:approved
chen-linxin4成员
6月9日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月9日 添加了label:lgtm
CANN-robotCANN-robot成员
6月9日 合入了pull request