Histogram Equalize augmentation for HOST and HIP#680
Histogram Equalize augmentation for HOST and HIP#680kiritigowda merged 35 commits intoROCm:developfrom
Conversation
r-abishek
commented
Feb 25, 2026
- Adds Histogram Equalize augmentation on HOST and HIP.
- Adds relevant unit/perf/qa tests.
Histogram Equalize kernel Implementation - HOST / HIP
There was a problem hiding this comment.
Pull request overview
This pull request adds histogram equalization augmentation support for both HOST (CPU) and HIP (GPU) backends. The implementation performs histogram equalization on RGB images by converting to YCbCr color space, equalizing the luminance (Y) channel, and converting back to RGB, which preserves chrominance information. For single-channel (greyscale) images, equalization is applied directly.
Changes:
- Adds
rppt_histogram_equalizeAPI function supporting U8 datatype with NCHW/NHWC layouts for 1 or 3 channel images - Implements CPU version with AVX2 SIMD optimizations for color space conversion and LUT building
- Implements GPU version with HIP kernels for parallel histogram computation, LUT generation, and application
- Adds test suite integration and Python test configuration
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| api/rppt_tensor_color_augmentations.h | Adds public API declaration and documentation for histogram_equalize function |
| src/modules/tensor/rppt_tensor_color_augmentations.cpp | Implements main entry point with validation and backend dispatch logic |
| src/modules/tensor/cpu/kernel/histogram_equalize.cpp | CPU implementation with RGB↔YCbCr conversion, histogram computation, and AVX2 optimizations |
| src/modules/tensor/hip/kernel/histogram_equalize.cpp | HIP kernels for parallel histogram collection, CDF computation, LUT generation, and color space conversion |
| src/include/tensor/host_tensor_executors.hpp | Adds function declaration for HOST backend executor |
| src/include/tensor/hip_tensor_executors.hpp | Adds function declaration for HIP backend executor |
| utilities/test_suite/rpp_test_suite_image.h | Adds enum value (102) and mapping for histogram_equalize test case |
| utilities/test_suite/common.py | Adds test configuration for histogram_equalize in augmentation map and color group |
| utilities/test_suite/HOST/Tensor_image_host.cpp | Integrates histogram_equalize test case into HOST test suite |
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Integrates histogram_equalize test case into HIP test suite |
| docs/data/doxygenOutputs/color_augmentations_histogram_equalize_img150x150.png | Adds sample output image for documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #680 +/- ##
===========================================
+ Coverage 92.55% 92.57% +0.02%
===========================================
Files 206 208 +2
Lines 92763 93500 +737
===========================================
+ Hits 85851 86553 +702
- Misses 6912 6947 +35
🚀 New features to boost your workflow:
|
|
please address all the review comments |
rrawther
left a comment
There was a problem hiding this comment.
please resolve all review comments