Skip to content

[hip-kernel-provider] Implement RMSNorm backward kernels and RMSNorm channel last support#7702

Merged
saikubairkota merged 13 commits into
developfrom
streamhpc/saikubairkota/rmsnorm-fwd-channel-last-en-bwd-kernel
May 29, 2026
Merged

[hip-kernel-provider] Implement RMSNorm backward kernels and RMSNorm channel last support#7702
saikubairkota merged 13 commits into
developfrom
streamhpc/saikubairkota/rmsnorm-fwd-channel-last-en-bwd-kernel

Conversation

@saikubairkota
Copy link
Copy Markdown
Contributor

@saikubairkota saikubairkota commented May 22, 2026

Caution: This PR should be merged only after this PR is merged.

Motivation

This PR implements the RMSNorm backward kernels and RMSNorm channel-last support for both forward and backward operations in the hip kernel provider.

Technical Details

  • Adds the RMSNorm backward kernels and makes relevant changes in RMSnormBwdPlan to compile and launch the kernels.
  • Adds channel last support for both RMSnormFwd and RMSnormBwd operations.
  • Adds/updates unit tests and integration tests to test the changes introduced in this PR.

Test Plan

Build the plugin and run the unit and integration tests with ninja check.

Test Result

All unit and integration tests pass successfully on an MI210.

Submission Checklist

@saikubairkota saikubairkota requested review from a team as code owners May 22, 2026 07:34
@saikubairkota saikubairkota self-assigned this May 22, 2026
@saikubairkota saikubairkota added the organization: streamhpc contributors from streamhpc label May 22, 2026
@EwanC EwanC requested review from EwanC and sbalint98 May 22, 2026 12:05
Comment thread dnn-providers/hip-kernel-provider/kernels/rmsnorm/RMSNormCommon.hpp
Copy link
Copy Markdown
Contributor

@sbalint98 sbalint98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me with one minor improvement suggestion

Comment thread dnn-providers/hip-kernel-provider/kernels/rmsnorm/RMSNormBwd.cpp
@saikubairkota saikubairkota force-pushed the streamhpc/saikubairkota/rmsnorm-fwd-channel-last-en-bwd-kernel branch from 7002769 to 6d259d3 Compare May 27, 2026 07:34
…lementation of channel last support for RMSNorm forward kernel
…, stride, & normalize dim calculation headers to common header for reuse
…plicability checks where affine tensors have to accept all types instead of stat tensors
…el dim when calculating outer size for channel-last layouts
…ect changes in kernel compilation & execution
@saikubairkota saikubairkota force-pushed the streamhpc/saikubairkota/rmsnorm-fwd-channel-last-en-bwd-kernel branch from 6d259d3 to e704121 Compare May 27, 2026 10:30
Copy link
Copy Markdown
Contributor

@EwanC EwanC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than a test naming convention issue that CI picked up

TestRMSnormBwdPlan.CompileBFp16SetsCorrectDefines  [FAIL]    
  -> Test case name should not contain keywords: Fp16. These belong in the test suite name.
TestRMSnormBwdPlan.CompileFp16SetsCorrectDefines   [FAIL]    
  -> Test case name should not contain keywords: Fp16. These belong in the test suite name.
TestRMSnormBwdPlan.CompileFp32SetsCorrectDefines   [FAIL]    
  -> Test case name should not contain keywords: Fp32. These belong in the test suite name.

@saikubairkota saikubairkota merged commit ca4930e into develop May 29, 2026
20 checks passed
@saikubairkota saikubairkota deleted the streamhpc/saikubairkota/rmsnorm-fwd-channel-last-en-bwd-kernel branch May 29, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants