Test suite - Add QA pass/fail tests for F32 bit depth#665
Test suite - Add QA pass/fail tests for F32 bit depth#665LakshmiKumar23 merged 39 commits intoROCm:developfrom
Conversation
* Removed memcpy and used hipHostMalloc for allocation : blend * Removed memcpy and used hipHostMalloc for allocation : brightness * Removed memcpy and used hipHostMalloc for allocation : color cast * Removed memcpy and used hipHostMalloc for allocation : color twist * Removed memcpy and used hipHostMalloc for allocation : contrast * Removed memcpy and used hipHostMalloc for allocation : crop mirror normalize * Removed memcpy and used hipHostMalloc for allocation : Exposure * Removed memcpy and used hipHostMalloc for allocation : Gamma correction * Removed memcpy and used hipHostMalloc for allocation : gaussian filter * Removed memcpy and used hipHostMalloc for allocation : Noise * Removed memcpy and used hipHostMalloc for allocation : Non linear blend * Removed memcpy and used hipHostMalloc for allocation : Resize mirror normalize * Removed memcpy and used hipHostMalloc for allocation : Water * Added hipHostFree for all kernels in test suite * Added hipHostFree for all kernels in test suite * Removed memcpy and used hipHostMalloc for allocation : Flip, spatter, rcm, color temperature * Resolved copilot review comments * Updated version * Removed unused parameter * Updated version in cmakeList * removed the host to device mem copies for warp affine and rotate * Updated version * Removed comment * Updated Chnagelog file * Update patch version from 2.2.0 to 2.2.1 * Update CHANGELOG * Address copilot comments for HIP HOST consistent allocation * Documentation changes for updated memcpy changes * Update ricap outer API to use pinned memory and remove mem copy * Fix memory allocation and deallocation for permutationTensor * Update api/rppt_tensor_effects_augmentations.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix spelling of noiseProbability and saltProbability * Fix deallocation --------- Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com> Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com> Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com> Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
F32 QA test suite upgradation
There was a problem hiding this comment.
Pull request overview
This PR adds QA testing support for F32 bit depth across 10 functions (pixelate, resize, rotate, lens_correction, resize_crop_mirror, tensor_sum, tensor_min, tensor_max, tensor_mean, tensor_stddev). Changes include adding F32-specific reference output data structures, implementing range checks, updating comparison functions with per-function tolerance cutoffs, fixing scaling issues in JPEG compression distortion, and correcting bilinear interpolation boundary calculations.
Changes:
- Added F32 reference output maps for tensor reduction operations (min/max/sum/mean/stddev)
- Updated comparison functions to accept test case parameter for dynamic tolerance thresholds
- Fixed JPEG compression quantization and scaling logic to match HOST reference implementation
- Corrected boundary limits in bilinear interpolation to prevent out-of-bounds reads
Reviewed changes
Copilot reviewed 13 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| utilities/test_suite/rpp_test_suite_image.h | Added F32 reference outputs for tensor operations and updated comparison functions with test case parameters |
| utilities/test_suite/common.py | Enabled HOST support for jpeg_compression_distortion |
| utilities/test_suite/HOST/Tensor_image_host.cpp | Extended QA comparison to support F32 bit depth for tensor reduction operations |
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Added qualityTensor parameter and extended F32 QA support |
| src/modules/tensor/rppt_tensor_geometric_augmentations.cpp | Added qualityTensor parameter to GPU function signature |
| src/modules/tensor/hip/kernel/jpeg_compression_distortion.cpp | Refactored quantization to use runtime scaling and added input scaling functions |
| src/modules/tensor/cpu/kernel/warp_affine.cpp | Optimized AVX computations using FMA instructions and fixed source location calculations |
| src/modules/tensor/cpu/kernel/resize_crop_mirror.cpp | Added clamping for bilinear interpolation source locations and corrected boundary margins |
| src/modules/tensor/cpu/kernel/resize.cpp | Increased buffer size for transpose operations and corrected bilinear boundary margins |
| src/modules/tensor/cpu/kernel/lens_correction.cpp | Optimized camera coordinate computation using FMA instructions |
| src/modules/tensor/cpu/kernel/jpeg_compression_distortion.cpp | Removed quantization table clamping to match reference behavior |
| src/include/tensor/hip_tensor_executors.hpp | Added qualityTensor parameter to function declaration |
| api/rppt_tensor_geometric_augmentations.h | Updated GPU API signature with qualityTensor parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
F32 QA resolved copilot review comments
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #665 +/- ##
===========================================
- Coverage 92.65% 92.65% -0.00%
===========================================
Files 194 194
Lines 82918 82926 +8
===========================================
+ Hits 76827 76833 +6
- Misses 6091 6093 +2
🚀 New features to boost your workflow:
|
* Travis CI - key error fix * Fix Bug in ColorTwist (#6) (#8) (#9) * Added golden outputs and resolved HOST backend * Updated bin files for median filter and resize crop mirror * Updated bin files * Updated bin files for the next set of kernel F32 QA * Updated bin files for jpeg_compression_distortion * Fixed resize QA failures * Fix for Resize bilinear F32 QA HOST and HIP * Fix for lens correction QA f32 for HOST and HIP for 1e-4 precision * Fixed HIP rcm QA * updates for warp Affine F32 QA * Fix for RCM QA match for U8 and F32 updates AVX * Fix for lens correction AVX * Removed space * Fixed warp affine for every other varient with the updated changes * Add fixes to match precision in quantization * Fix Precision mismatches * Update default cutoff to 1e-5 and specialized cutoff to 1e-4 * F32 QA Fix * Made Quality percentage as arg from testsuite * Resolved copilot comments * Resolved the copilot comments * Resolved Codex comments * HOST and HIP - pinned buffers for respective API (ROCm#628) * Removed memcpy and used hipHostMalloc for allocation : blend * Removed memcpy and used hipHostMalloc for allocation : brightness * Removed memcpy and used hipHostMalloc for allocation : color cast * Removed memcpy and used hipHostMalloc for allocation : color twist * Removed memcpy and used hipHostMalloc for allocation : contrast * Removed memcpy and used hipHostMalloc for allocation : crop mirror normalize * Removed memcpy and used hipHostMalloc for allocation : Exposure * Removed memcpy and used hipHostMalloc for allocation : Gamma correction * Removed memcpy and used hipHostMalloc for allocation : gaussian filter * Removed memcpy and used hipHostMalloc for allocation : Noise * Removed memcpy and used hipHostMalloc for allocation : Non linear blend * Removed memcpy and used hipHostMalloc for allocation : Resize mirror normalize * Removed memcpy and used hipHostMalloc for allocation : Water * Added hipHostFree for all kernels in test suite * Added hipHostFree for all kernels in test suite * Removed memcpy and used hipHostMalloc for allocation : Flip, spatter, rcm, color temperature * Resolved copilot review comments * Updated version * Removed unused parameter * Updated version in cmakeList * removed the host to device mem copies for warp affine and rotate * Updated version * Removed comment * Updated Chnagelog file * Update patch version from 2.2.0 to 2.2.1 * Update CHANGELOG * Address copilot comments for HIP HOST consistent allocation * Documentation changes for updated memcpy changes * Update ricap outer API to use pinned memory and remove mem copy * Fix memory allocation and deallocation for permutationTensor * Update api/rppt_tensor_effects_augmentations.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix spelling of noiseProbability and saltProbability * Fix deallocation --------- Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com> Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com> Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com> Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * resolved review comments * minor comment change * Resolved copilot review comments * Update src/modules/tensor/cpu/kernel/resize.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/modules/tensor/cpu/kernel/resize.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/modules/tensor/hip/kernel/jpeg_compression_distortion.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Updated test suite and resoled review comments * Updated HIP for F32 QA reduction function cases --------- Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com> Co-authored-by: Lokesh Bonta <lokeswara@multicorewareinc.com> Co-authored-by: sampath117 <snehaa@multicorewareinc.com> Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com> Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com> Co-authored-by: ManasaDattaT <tammisetti.manasadatta@multicorewareinc.com> Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com> Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
* add support for dilate in HOST backend
* minor fix in changelog
* added golden outputs
remove commented code
* resolve build errors
* Add padding changes in HIP backend
* fix sigsev issues
* fix QA for 9x9 kernel
* Add if condition for pack function and template for unpack and signext function
* Fix the rename of preLoadRows and max Comments
* Fix Fix remane of Loader and MorphVecLoader
* Fix empty space, dilate_row_hip_compute function, removed if & else and aligned indent R.
* Fix remove whitespace and restored all unnecessary changes.
* Fix remove precision line and reverted back to static cast.
* Fix remove empty line, rename of kernelSze & padPolicy and remove {} for single line condition
* Fix Indentation of IF condition.
* resolved review comments
* resolve review comments
* Test suite - Add QA pass/fail tests for F32 bit depth (#665)
* Travis CI - key error fix
* Fix Bug in ColorTwist (#6) (#8) (#9)
* Added golden outputs and resolved HOST backend
* Updated bin files for median filter and resize crop mirror
* Updated bin files
* Updated bin files for the next set of kernel F32 QA
* Updated bin files for jpeg_compression_distortion
* Fixed resize QA failures
* Fix for Resize bilinear F32 QA HOST and HIP
* Fix for lens correction QA f32 for HOST and HIP for 1e-4 precision
* Fixed HIP rcm QA
* updates for warp Affine F32 QA
* Fix for RCM QA match for U8 and F32 updates AVX
* Fix for lens correction AVX
* Removed space
* Fixed warp affine for every other varient with the updated changes
* Add fixes to match precision in quantization
* Fix Precision mismatches
* Update default cutoff to 1e-5 and specialized cutoff to 1e-4
* F32 QA Fix
* Made Quality percentage as arg from testsuite
* Resolved copilot comments
* Resolved the copilot comments
* Resolved Codex comments
* HOST and HIP - pinned buffers for respective API (#628)
* Removed memcpy and used hipHostMalloc for allocation : blend
* Removed memcpy and used hipHostMalloc for allocation : brightness
* Removed memcpy and used hipHostMalloc for allocation : color cast
* Removed memcpy and used hipHostMalloc for allocation : color twist
* Removed memcpy and used hipHostMalloc for allocation : contrast
* Removed memcpy and used hipHostMalloc for allocation : crop mirror normalize
* Removed memcpy and used hipHostMalloc for allocation : Exposure
* Removed memcpy and used hipHostMalloc for allocation : Gamma correction
* Removed memcpy and used hipHostMalloc for allocation : gaussian filter
* Removed memcpy and used hipHostMalloc for allocation : Noise
* Removed memcpy and used hipHostMalloc for allocation : Non linear blend
* Removed memcpy and used hipHostMalloc for allocation : Resize mirror normalize
* Removed memcpy and used hipHostMalloc for allocation : Water
* Added hipHostFree for all kernels in test suite
* Added hipHostFree for all kernels in test suite
* Removed memcpy and used hipHostMalloc for allocation : Flip, spatter, rcm, color temperature
* Resolved copilot review comments
* Updated version
* Removed unused parameter
* Updated version in cmakeList
* removed the host to device mem copies for warp affine and rotate
* Updated version
* Removed comment
* Updated Chnagelog file
* Update patch version from 2.2.0 to 2.2.1
* Update CHANGELOG
* Address copilot comments for HIP HOST consistent allocation
* Documentation changes for updated memcpy changes
* Update ricap outer API to use pinned memory and remove mem copy
* Fix memory allocation and deallocation for permutationTensor
* Update api/rppt_tensor_effects_augmentations.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix spelling of noiseProbability and saltProbability
* Fix deallocation
---------
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* resolved review comments
* minor comment change
* Resolved copilot review comments
* Update src/modules/tensor/cpu/kernel/resize.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/tensor/cpu/kernel/resize.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/tensor/hip/kernel/jpeg_compression_distortion.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated test suite and resoled review comments
* Updated HIP for F32 QA reduction function cases
---------
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Lokesh Bonta <lokeswara@multicorewareinc.com>
Co-authored-by: sampath117 <snehaa@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: ManasaDattaT <tammisetti.manasadatta@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
* Erode - HOST and HIP update (#666)
* added initial api support for erode
* added support for U8 and I8 bitdepths for 3, 5, 7, 9 kernel sizes
* added F16 and F32 bitdepth support
* added generic kernel support
* added golden outputs
removed commented code
* fix build errors
* Fix build and test_suite errors
* revert padding changes
* updated erode HIP kernel with latest changes
* Add F32 QA
* minor formatting fixes
* minor comment fix
* resolve copilot comments
* resolve review comments
* resolved review comments
* Add unpack templating changes and fix segmentation issue
* Fix PKD to PKD kernel 9 for Pack and Unpack changes.
* Add and template signext function
* Fix min Comments
* Fix one min Comments
* Add unroll and rename of preLoadRows
* Fix remane of Loader and MorphVecLoader
* Add empty line before comment
* Fix remove empty line, rename of kernelSze & padPolicy and remove {} for single line condition
* resolved review comments
* fix build warnings
---------
Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Mukesh Jayakodi <mukesh.jayakodi@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <119284987+HazarathKumarM@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
* fix build errors
---------
Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Mukesh Jayakodi <mukesh.jayakodi@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <119284987+HazarathKumarM@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Lokesh Bonta <lokeswara@multicorewareinc.com>
Co-authored-by: sampath117 <snehaa@multicorewareinc.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: ManasaDattaT <tammisetti.manasadatta@multicorewareinc.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
The PR adds necessary changes to pass internal QA testing support for F32 bit depth for next set of 10 functions -
pixelate, resize, rotate, lens_correction, resize_crop_mirror, tensor_sum, tensor_min, tensor_max, tensor_mean, tensor_stddev
Add range checks rpp_pixel_check_0to1 to ensure F32 bit depth QA test pass.
Add necessary bin files for reference output.