Skip to content

[hip-kernel-provider] Batch Norm forward inference functionality with variance variant & fused activation operations#5566

Open
saikubairkota wants to merge 3 commits intodevelopfrom
streamhpc/saikubairkota/complete-bn-fwd-inference-functionality
Open

[hip-kernel-provider] Batch Norm forward inference functionality with variance variant & fused activation operations#5566
saikubairkota wants to merge 3 commits intodevelopfrom
streamhpc/saikubairkota/complete-bn-fwd-inference-functionality

Conversation

@saikubairkota
Copy link
Contributor

@saikubairkota saikubairkota commented Mar 18, 2026

Motivation

This PR completes the Batch Norm Forward Inference implementation in the HIP kernel provider plugin by adding support for the remaining variance-based variant (it takes variance as input instead of the inverse variance). In addition, fused activation support is added in both Batch Norm Forward Inference variants.

Technical Details

  • Added a new BatchnormFwdInferenceWithVariancePlan to support the forward inference variant with variance input.
  • Updated BatchnormFwdInferencePlan to support fused activation operations.
  • Updated BatchnormPlanBuilder to enable graph construction for the new variance variant and the fused operations.
  • Added corresponding unit and integration tests for the variance variant and fused operations.

Note: The activation functions and fused operations-related code in the plans have been added from our previous work in this PR.

Test Plan

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

Test Result

All unit and integration tests pass successfully on an MI210.

Submission Checklist

…ded new plan with variance tensor as input to batchnorm fwd inference kernels
…orm forward inference with variance operation
…inference with activation fusion & added relevant tests
@saikubairkota saikubairkota force-pushed the streamhpc/saikubairkota/complete-bn-fwd-inference-functionality branch from 1f7c97e to 1586dd6 Compare March 18, 2026 16:55
@saikubairkota
Copy link
Contributor Author

saikubairkota commented Mar 18, 2026

Question for the reviewer: Should we use a consistent namespace throughout because currently we use namespace hip_kernel_provider in some places and namespace hip_kernel_plugin in some other places?

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project status has failed because the head coverage (77.21%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5566   +/-   ##
========================================
  Coverage    67.27%   67.27%           
========================================
  Files         1844     1844           
  Lines       284014   284014           
  Branches     39839    39839           
========================================
+ Hits        191044   191045    +1     
+ Misses       76512    76511    -1     
  Partials     16458    16458           
Flag Coverage Δ *Carryforward flag
hipBLAS 90.67% <ø> (ø) Carriedforward from 02f625e
hipBLASLt 43.49% <ø> (ø) Carriedforward from 02f625e
hipCUB 82.21% <ø> (ø) Carriedforward from 02f625e
hipDNN 85.13% <ø> (+<0.01%) ⬆️
hipFFT 55.59% <ø> (ø) Carriedforward from 02f625e
hipRAND 76.12% <ø> (ø) Carriedforward from 02f625e
hipSOLVER 68.81% <ø> (ø) Carriedforward from 02f625e
hipSPARSE 84.70% <ø> (ø) Carriedforward from 02f625e
rocBLAS 47.97% <ø> (ø) Carriedforward from 02f625e
rocFFT 53.24% <ø> (ø) Carriedforward from 02f625e
rocRAND 57.07% <ø> (ø) Carriedforward from 02f625e
rocSOLVER 77.21% <ø> (ø) Carriedforward from 02f625e
rocSPARSE 71.48% <ø> (ø) Carriedforward from 02f625e

*This pull request uses carry forward flags. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants