Merged
feat(RecurrentGatedDeltaRule): 支持 float32 类型的 ssm_state 输入输出 #5750
feat(RecurrentGatedDeltaRule): 支持 float32 类型的 ssm_state 输入输出 #5750
Merged
Vi1taAdd on May 22
Vi1ta
Vi1ta
May 22

描述

本次改动为 RecurrentGatedDeltaRule 算子增加 state / state_out 的 float32 数据类型支持。

主要改动包括:

  • 在算子原型定义中为 state 和 state_out 增加 DT_FLOAT 支持,保留原有 BF16 输入输出能力。
  • 在 tiling 阶段识别 state 数据类型,并通过 tilingKey 区分 BF16 state 与 FP32 state 场景。
  • 根据 state 数据类型调整 UB 空间计算,保证 FP32 state 场景下 tiling 计算使用正确的元素字节数。
  • 在 kernel 侧增加 tiling key 定义,并适配 FP32 state 场景的处理路径。
  • 补充 FP32 state 的 host tiling 单元测试,验证 tilingKey 选择正确。

关联的Issue

https://atomgit.com/cann/ops-transformer/issues/1725

测试

已补充 RecurrentGatedDeltaRule host tiling UT:

  • BF16 state 场景:期望 tilingKey = 0
  • FP32 state 场景:期望 tilingKey = 1

本地未执行完整二级冒烟和算子泛化测试。

文档更新

无文档更新。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for Vi1ta's contribution.)
Vi1taVi1ta
May 22 Created pull request, commit cb6e425d
Vi1taVi1ta
May 22 Associated issue: [Requirement|需求建议]: 为 `RecurrentGatedDeltaRule` 算子新增 `float32` 类型的 `state`(ssm_state)支持。
CANN-robot
CANN-robotCollaborators
May 22 Comments:

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_host/*_def.cpp ✅ 王永光, 蒋礼锐 (2/2) ✅ 王永光 (1/1)
attention ✅ 蒋礼锐, zzy__ (2/2) ✅ 蒋礼锐 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
May 22 Added label: cann-cla/yes
CANN-robotCANN-robotCollaborators
May 22 Set juyangokok,monologue815,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,wangyongguang,haijie_699874,zzy__ as approver
67 messages are collapsed here。 See more
wangyongguang
wangyongguangCollaborators
Jul 2 Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
Jul 2 Added label: approved
赵志勇
赵志勇Collaborators
Jul 2 Comments:

/lgtm

likedislike
CANN-robotCANN-robotCollaborators
Jul 2 Added label: lgtm
CANN-robotCANN-robotCollaborators
Jul 2 Merged pull request