Skip to content

Test Suite - Cutout Dropout - HIP and HOST - Bug fix#701

Merged
rrawther merged 12 commits into
ROCm:developfrom
LakshmiKumar23:lk/test_fix
Apr 7, 2026
Merged

Test Suite - Cutout Dropout - HIP and HOST - Bug fix#701
rrawther merged 12 commits into
ROCm:developfrom
LakshmiKumar23:lk/test_fix

Conversation

@LakshmiKumar23
Copy link
Copy Markdown
Contributor

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:

------------------------------------------------------------------------------------------
---------------------------------- Results of QA Test - Tensor_image_hip ----------------------------------

channel_dropout_u8_Tensor_PKD3_to_PKD3: PASSED
channel_dropout_u8_Tensor_PKD3_to_PLN3: PASSED
channel_dropout_f32_Tensor_PKD3_to_PKD3: PASSED
channel_dropout_f32_Tensor_PKD3_to_PLN3: PASSED
channel_dropout_u8_Tensor_PLN3_to_PLN3: PASSED
channel_dropout_u8_Tensor_PLN3_to_PKD3: PASSED
channel_dropout_f32_Tensor_PLN3_to_PLN3: PASSED
channel_dropout_f32_Tensor_PLN3_to_PKD3: PASSED
channel_dropout_u8_Tensor_PLN1_to_PLN1: PASSED
channel_dropout_f32_Tensor_PLN1_to_PLN1: PASSED

---------------------------------- Summary of QA Test - Tensor_image_hip ----------------------------------

Final Results of Tests:
    - Total test cases including all subvariants REQUESTED = 10
    - Total test cases including all subvariants PASSED = 10

General information on Tensor voxel test suite availability:
    - Total augmentations supported in Tensor test suite = 71
    - Total augmentations with golden output QA test support = 63
    - Total augmentations without golden ouput QA test support (due to randomization involved) = 8

HOST results:

------------------------------------------------------------------------------------------
---------------------------------- Results of QA Test - Tensor_image_host ----------------------------------

channel_dropout_u8_Tensor_PKD3_to_PKD3: PASSED
channel_dropout_u8_Tensor_PKD3_to_PLN3: PASSED
channel_dropout_f32_Tensor_PKD3_to_PKD3: PASSED
channel_dropout_f32_Tensor_PKD3_to_PLN3: PASSED
channel_dropout_u8_Tensor_PLN3_to_PLN3: PASSED
channel_dropout_u8_Tensor_PLN3_to_PKD3: PASSED
channel_dropout_f32_Tensor_PLN3_to_PLN3: PASSED
channel_dropout_f32_Tensor_PLN3_to_PKD3: PASSED
channel_dropout_u8_Tensor_PLN1_to_PLN1: PASSED
channel_dropout_f32_Tensor_PLN1_to_PLN1: PASSED

---------------------------------- Summary of QA Test - Tensor_image_host ----------------------------------

Final Results of Tests:
    - Total test cases including all subvariants REQUESTED = 10
    - Total test cases including all subvariants PASSED = 10

General information on Tensor voxel test suite availability:
    - Total augmentations supported in Tensor test suite = 71
    - Total augmentations with golden output QA test support = 63
    - Total augmentations without golden ouput QA test support (due to randomization involved) = 8

Submission Checklist

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_erase API 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_SEED in QA mode and std::random_device otherwise.
  • 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.

Comment on lines 1875 to 1877
Rpp32u boxesInEachImage = 1;
bool randomSeed = qaFlag ? false : true;
Rpp32f seed = qaFlag ? DROPOUT_FIXED_SEED : std::random_device{}();

Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread utilities/test_suite/HOST/Tensor_image_host.cpp Outdated
Comment thread utilities/test_suite/HIP/Tensor_image_hip.cpp Outdated
Comment thread utilities/test_suite/HIP/Tensor_image_hip.cpp Outdated
Comment thread utilities/test_suite/rpp_test_suite_image.h
Copy link
Copy Markdown
Contributor

@rrawther rrawther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment

Comment thread utilities/test_suite/rpp_test_suite_image.h
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

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     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kiritigowda
Copy link
Copy Markdown
Collaborator

@LakshmiKumar23 failing the CI

@rrawther rrawther merged commit 1870fe2 into ROCm:develop Apr 7, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants