Test Suite - Cutout Dropout - HIP and HOST - Bug fix#701
Conversation
… into lk/test_fix
… into lk/test_fix
There was a problem hiding this comment.
Pull request overview
Fixes failing Cutout Dropout QA tests on both HIP and HOST by restoring/adjusting dropout region initialization and making seeding behavior consistent across backends.
Changes:
- Updated
init_dropout_eraseAPI to take an explicit seed and optional (typed) color buffer, and adjusted cutout/coarse box generation. - Updated HOST and HIP tensor test drivers to use
DROPOUT_FIXED_SEEDin QA mode andstd::random_deviceotherwise. - Added per-bitdepth color-buffer writes for cutout dropout initialization.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| utilities/test_suite/rpp_test_suite_image.h | Refactors dropout region initializer to accept explicit seed and optionally populate a typed color buffer. |
| utilities/test_suite/HOST/Tensor_image_host.cpp | Updates cutout/coarse dropout test setup to pass explicit seed/bitdepth into init_dropout_erase. |
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Updates cutout/coarse dropout test setup to pass explicit seed/bitdepth into init_dropout_erase. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Rpp32u boxesInEachImage = 1; | ||
| bool randomSeed = qaFlag ? false : true; | ||
| Rpp32f seed = qaFlag ? DROPOUT_FIXED_SEED : std::random_device{}(); | ||
|
|
There was a problem hiding this comment.
seed is declared as Rpp32f but is used as the RNG seed (and passed to init_dropout_erase, which takes an int seed). Storing std::random_device{}() in a float can lose entropy due to rounding, and the implicit float->int conversion is accidental. Use an integer seed type (e.g., Rpp32u/uint32_t/int) end-to-end.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #701 +/- ##
===========================================
- Coverage 92.52% 92.52% -0.00%
===========================================
Files 215 215
Lines 95983 95983
===========================================
- Hits 88801 88799 -2
- Misses 7182 7184 +2 🚀 New features to boost your workflow:
|
|
@LakshmiKumar23 failing the CI |
Motivation
Cutout Dropout tests were failing on both HIP and HOST for the QA test suite. This PR fixes both backends
Technical Details
I think there were some issues when the original PRs for Gris and Coarse Dropout kernels were updated for merge conflicts and pushed. These PR brings back the changes from both branches to run successfully on Cutout Dropout and Coarse Dropout.
Test Plan
Ctests for both HIP and HOST must pass cutout dropout. Existing failures on Grid dropout on HIP side still exist and will be fixed in a separate PR.
Test Result
HIP results:
HOST results:
Submission Checklist