Repository navigation
feat(hipdnn): add GPU batchnorm backward reference - #12520
BalintCsala merged 10 commits into
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
8e3935f to
446477c
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The only unresolved finding is a non-blocking test-coverage nit.
Review effort: Balanced
Findings: None
What changed in this PR
Adds a HipRTC GPU reference implementation for batch normalization backward, supporting FP32, FP16, BFP16, and saved or calculated statistics.
Changes:
- Adds the backward kernel, launch API, arguments, and validation.
- Adds CPU-comparison integration tests and build registration.
- Supports multiple tensor ranks and layouts.
| File | Description |
|---|---|
dnn-providers/integration-tests/tests/gpu-ref/TestGpuFpReferenceBatchnormBwd.cpp |
Adds CPU/GPU correctness tests; larger calculated-statistics coverage is suggested. |
dnn-providers/integration-tests/tests/CMakeLists.txt |
Registers the new tests. |
dnn-providers/integration-tests/gpu-ref/src/GpuFpReferenceBatchnorm.cpp |
Implements kernel compilation and launch. |
dnn-providers/integration-tests/gpu-ref/kernels/types/GpuRefBatchnormArgs.h |
Defines backward kernel arguments. |
dnn-providers/integration-tests/gpu-ref/kernels/CMakeLists.txt |
Packages the new kernel. |
dnn-providers/integration-tests/gpu-ref/kernels/batchnorm/GpuRefBatchnormBwd.cpp |
Implements backward calculations and reductions. |
dnn-providers/integration-tests/gpu-ref/include/hipdnn-gpu-ref/GpuFpReferenceBatchnorm.hpp |
Adds the backward API and validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
a33924e to
90cc000
Compare
2b977f9 to
2cfcd6b
Compare
Pre-commit check failed⛔ pre-commit failed Please run locally:
This repo uses |
49f78d7 to
6211a09
Compare
6211a09 to
a78b447
Compare
adickin-amd
left a comment
There was a problem hiding this comment.
A few things to look at but overall LGTM
|
Cancelling the remaining gfx950 jobs on this run so the TheRock submodule bump PRs can be prioritized on the gfx950 queue. This change does not target gfx950, and gfx950 was the only work still outstanding. Jobs that already finished are unchanged. Re-run failed jobs if you need gfx950 results before merge. |
TheRock Submodule Bump ActivityNewest first
|
Motivation
We need a reference batchnorm backward implementation on the GPU for faster tests.
Closes #12519
Technical Details
Kernel is compiled with HipRTC and supports fp32, fp16 and bfp16.
Test Plan
Tested against the CPU implementation.
Test Result
Tests passes locally.
Submission Checklist