-
Notifications
You must be signed in to change notification settings - Fork 49
Gaussian Filter - Edge NN-padding support and QA test updates #639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Gaussian filter padding updates with QA support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds nearest-neighbor padding support for the Gaussian filter augmentation to prevent border pixels from fading out. The changes include API updates, kernel optimizations for both HIP and HOST backends, and enhanced QA test support.
Key Changes
- Added
borderTypeparameter to gaussian filter API functions with REPLICATE (nearest-neighbor) support - Introduced
RpptImageBorderEdgeenum for identifying image border edges - Templated helper functions on HIP backend (reduced from 36 functions to 3 templated functions)
- Updated QA test suite to enable gaussian filter testing for F32 and U8 formats
- Performance optimizations showing 37-82% improvement for specific F32 PKD3 variants on kernel sizes 5, 7, and 9
Reviewed Changes
Copilot reviewed 9 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| api/rppt_tensor_filter_augmentations.h | Added borderType parameter to gaussian filter API signatures |
| api/rppdefs.h | Introduced RpptImageBorderEdge enum for edge identification |
| utilities/test_suite/rpp_test_suite_image.h | Removed GAUSSIAN_FILTER from nonQACases to enable QA testing |
| utilities/test_suite/HOST/Tensor_image_host.cpp | Added borderType validation and parameter passing |
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Added borderType validation and parameter passing |
| src/modules/tensor/rppt_tensor_filter_augmentations.cpp | Added borderType parameter validation |
| src/modules/tensor/hip/kernel/gaussian_filter.cpp | Major refactoring with templated functions and NN padding logic |
| src/modules/tensor/cpu/kernel/gaussian_filter.cpp | Enhanced with templated load functions and padding support |
| src/include/common/cpu/rpp_cpu_simd_load_store.hpp | Added store24 functions for various data types |
| docs/data/doxygenOutputs/*.png | Updated documentation images |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| rpp_hip_load24_pkd3_to_uchar8_pln3(srcPtr + srcIdx, src_smem_channel); | ||
| } | ||
| if ((id_x_i > roiBeginX) && ((id_x_i + 7 + padLength) < roiWidth) && (id_y_i > roiBeginY) && (id_y_i < roiHeight)) |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition id_x_i > roiBeginX uses strict inequality, but should use >= for proper boundary checking. When id_x_i == roiBeginX, this is a valid position that doesn't need padding, but the current condition forces it into the padding path.
| if ((id_x_i > roiBeginX) && ((id_x_i + 7 + padLength) < roiWidth) && (id_y_i > roiBeginY) && (id_y_i < roiHeight)) | |
| if ((id_x_i >= roiBeginX) && ((id_x_i + 7 + padLength) < roiWidth) && (id_y_i > roiBeginY) && (id_y_i < roiHeight)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #639 +/- ##
===========================================
- Coverage 88.33% 88.13% -0.19%
===========================================
Files 195 195
Lines 82723 82479 -244
===========================================
- Hits 73068 72692 -376
- Misses 9655 9787 +132
🚀 New features to boost your workflow:
|
Copilot comment and documentation updates - gaussian filter
|
@r-abishek please resolve conflicts |
rrawther
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SundarRajan28 : Would like to review this PR with you before merging
Co-authored-by: Copilot <[email protected]>
Gaussian Filter ROI Fixes
This PR adds nearest neighbors padding for gaussian filter augmentation.
This is similar to the fixes in box/median already in ToT.
Current gaussian filter ToT version had border pixels fading out without NN padding, the PR attempts to fix the same.
Performance profiling to ensure no significant changes in performance due to addition of computation on nearest neighbor padding.
(Significant performance boost in the F32 PKD3 HIP variant observed)