Skip to content

[UPDATE] merge NormForward and NormNoRstdForward into one base class - #396

Draft
MeowMiaoJ wants to merge 4 commits into
sgl-project:mainfrom
MeowMiaoJ:norm
Draft

[UPDATE] merge NormForward and NormNoRstdForward into one base class#396
MeowMiaoJ wants to merge 4 commits into
sgl-project:mainfrom
MeowMiaoJ:norm

Conversation

@MeowMiaoJ

Copy link
Copy Markdown
Contributor

Fuse NormFoward and NormNoRstdFoward into one base class. In this class, the default path is norstd norm, and the fallback path is norm. This base class will serve as the only base class and gemma\fused class will inherent it.

Add benchmark file for RMSNorm. The benchmark performance speedup is shown below.

origin rms_norm norstd rms_norm additional gain origin fused_add_rms_norm norstd fused_add_rms_norm additional gain
avg speedup 6.49x 7.15x 10.26% 3.00x 3.01x 0.49%
max speedup 25.30x 39.88x 57.63% 6.43x 6.21x -3.42%
min speedup 1.98x 2.07x 4.55% 1.88x 1.88x 0.00%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant