Skip to content

Dropout (Grid) and Dropout (Cutout) on HIP and HOST#679

Merged
LakshmiKumar23 merged 139 commits intoROCm:developfrom
r-abishek:ar/dropout_grid_cutout
Mar 23, 2026
Merged

Dropout (Grid) and Dropout (Cutout) on HIP and HOST#679
LakshmiKumar23 merged 139 commits intoROCm:developfrom
r-abishek:ar/dropout_grid_cutout

Conversation

@r-abishek
Copy link
Copy Markdown
Member

  • Adds Grid and Cutout Dropout augmentations on HIP and HOST
  • Adds support for U8/F32/F16/I8 bit depths and NCHW/NHWC variants with toggle support
  • Adds relevant unit / qa / performance tests

snehaa8 and others added 30 commits August 22, 2025 07:39
…ied QA for logic to implement random seed for non QA
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

This PR adds two new tensor image augmentations—Cutout Dropout and Grid Dropout—across HOST and HIP backends, and wires them into the test suite and Doxygen docs.

Changes:

  • Add rppt_cutout_dropout and rppt_grid_dropout APIs and backend dispatch in rppt_tensor_effects_augmentations.cpp.
  • Implement Grid Dropout kernels for CPU and HIP, plus test-suite ROI/anchor initializers for Cutout/Grid dropout.
  • Register new augmentations in the test-suite maps/enums and add HOST/HIP test-case execution paths and doc output assets.

Reviewed changes

Copilot reviewed 10 out of 16 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
utilities/test_suite/rpp_test_suite_image.h Adds augmentation IDs and introduces Cutout/Grid dropout ROI+anchor initializers for tests.
utilities/test_suite/common.py Registers new augmentation IDs for test harness routing.
utilities/test_suite/HOST/Tensor_image_host.cpp Adds HOST-side test cases invoking rppt_cutout_dropout / rppt_grid_dropout.
utilities/test_suite/HIP/Tensor_image_hip.cpp Adds HIP-side test cases and allocations for Cutout/Grid dropout.
src/modules/tensor/rppt_tensor_effects_augmentations.cpp Adds public API entry points and backend dispatch for Cutout/Grid dropout.
src/modules/tensor/hip/kernel/grid_dropout.cpp Introduces HIP grid-dropout executor and kernels.
src/modules/tensor/cpu/kernel/grid_dropout.cpp Introduces CPU grid-dropout implementation.
src/include/tensor/host_tensor_executors.hpp Declares grid_dropout_host_tensor.
src/include/tensor/hip_tensor_executors.hpp Declares hip_exec_grid_dropout_tensor.
docs/data/doxygenOutputs/effects_augmentation_gird_dropout_img150x150.png Adds a Doxygen output image for grid dropout (filename includes a typo).
docs/data/doxygenOutputs/effects_augmentation_cutout_dropout_img150x150.png Adds a Doxygen output image for cutout dropout.
api/rppt_tensor_effects_augmentations.h Documents and declares rppt_cutout_dropout and rppt_grid_dropout APIs.
Comments suppressed due to low confidence (1)

utilities/test_suite/HIP/Tensor_image_hip.cpp:2192

  • When testCase == GRID_DROPOUT, anchorBoxInfoTensor is allocated with hipHostMalloc, but it is never freed in the cleanup section (the free is gated by testCase == ERASE || testCase == CUTOUT_DROPOUT). Add a corresponding hipHostFree(anchorBoxInfoTensor) for the grid-dropout path (and avoid double-free by structuring ownership clearly).
    if(testCase == ERASE || testCase == CUTOUT_DROPOUT)
    {
        CHECK_RETURN_STATUS(hipHostFree(colorBuffer));
        CHECK_RETURN_STATUS(hipHostFree(anchorBoxInfoTensor));
        CHECK_RETURN_STATUS(hipHostFree(numOfBoxes));
    }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 97.53954% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...dules/tensor/rppt_tensor_effects_augmentations.cpp 95.56% 12 Missing ⚠️
src/modules/tensor/hip/kernel/grid_dropout.cpp 97.75% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #679      +/-   ##
===========================================
- Coverage    92.49%   91.96%   -0.52%     
===========================================
  Files          202      204       +2     
  Lines        91730    92299     +569     
===========================================
+ Hits         84838    84882      +44     
- Misses        6892     7417     +525     
Files with missing lines Coverage Δ
src/modules/tensor/cpu/kernel/grid_dropout.cpp 100.00% <100.00%> (ø)
src/modules/tensor/hip/kernel/grid_dropout.cpp 97.75% <97.75%> (ø)
...dules/tensor/rppt_tensor_effects_augmentations.cpp 89.50% <95.56%> (-3.40%) ⬇️

... and 4 files with indirect coverage changes

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

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.

please address all the review comments

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.

please address review comments

@LakshmiKumar23 LakshmiKumar23 merged commit 74e2209 into ROCm:develop Mar 23, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:precheckin enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants