Skip to content

Grid and Cutout Dropout implementation#553

Merged
r-abishek merged 124 commits intor-abishek:ar/dropout_grid_cutoutfrom
RooseweltMcW:apr/grid_cutout_dropout
Feb 21, 2026
Merged

Grid and Cutout Dropout implementation#553
r-abishek merged 124 commits intor-abishek:ar/dropout_grid_cutoutfrom
RooseweltMcW:apr/grid_cutout_dropout

Conversation

@RooseweltMcW
Copy link
Copy Markdown

No description provided.

snehaa8 and others added 30 commits August 22, 2025 07:39
…ied QA for logic to implement random seed for non QA
dstPtrRowG += dstDescPtr->strides.hStride;
dstPtrRowB += dstDescPtr->strides.hStride;
}
for(int count = 0; count < numBoxes; count++)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did we check the impact on erase due to all these changes?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

reverted back, Done

ManasaDattaT pushed a commit to ManasaDattaT/rpp that referenced this pull request Dec 19, 2025
* Fix log1p test suite upgrades for HIP

* Updates for HOST Test Fixes

* Fixes for box filter

* Remove hardcoding of channel details

* Update utilities/test_suite/rpp_test_suite_misc.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update utilities/test_suite/HIP/Tensor_misc_hip.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
#endif // GPU_SUPPORT

/*! \brief Cutout dropout augmentation on HOST backend for a NCHW/NHWC layout tensor
* \details Cutout dropout function erases one random regions from an image, for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.<br>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

change it like
Cutout dropout function erases random region from an image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done

* \param [in] srcDescPtr source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)
* \param [out] dstPtr destination tensor in HIP memory
* \param [in] dstDescPtr destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
* \param [in] anchorBoxInfoTensor Precomputed cutout erase regions for the batch, stored as an array of RpptRoiLtrb of size (batchSize * boxesInEachImage)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please add the memory types like pinned / HIP for all the params

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done

* \param [in] srcDescPtr source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)
* \param [out] dstPtr destination tensor in HIP memory
* \param [in] dstDescPtr destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
* \param [in] anchorBoxInfoTensor Precomputed grid erase regions for the batch, stored as an array of RpptRoiLtrb of size (batchSize * boxesInEachImage)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

specify the memory type

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done


#include "rpp.h"
#include "rppdefs.h"
#include <random>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why this is included here, please check and remove if it's not needed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed, Done.

RppPtr_t dstPtr,
RpptDescPtr dstDescPtr,
RpptRoiLtrb *anchorBoxInfoTensor,
RppPtr_t colorsTensor,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why colors tensor is void *?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is it not black always?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Followed similar parameter used in erase kernel for color tensor

@HazarathKumarM HazarathKumarM changed the base branch from develop to master January 13, 2026 09:52
@HazarathKumarM HazarathKumarM changed the base branch from master to develop January 13, 2026 09:52
RooseweltMcW pushed a commit to HazarathKumarM/rpp that referenced this pull request Jan 21, 2026
* Fix log1p test suite upgrades for HIP

* Updates for HOST Test Fixes

* Fixes for box filter

* Remove hardcoding of channel details

* Update utilities/test_suite/rpp_test_suite_misc.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update utilities/test_suite/HIP/Tensor_misc_hip.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
@r-abishek
Copy link
Copy Markdown
Owner

@HazarathKumarM @RooseweltMcW ToT merge and Unified API changes to be reflected.

…ut and updated grid and cutout dropout with unified API changes
Copy link
Copy Markdown
Owner

@r-abishek r-abishek left a comment

Choose a reason for hiding this comment

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

@HazarathKumarM @RooseweltMcW Pls take a look.

Rpp32u totalBoxes = srcDescPtr->n * boxesInEachImage;

RpptRoiLtrb *d_anchorBoxInfoTensor;
hipMalloc(&d_anchorBoxInfoTensor, totalBoxes * sizeof(RpptRoiLtrb));
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@HazarathKumarM Why do we have a hipMalloc here inside the kernel?
Can't use any of our pre-allocated hip buffer? Or the preallocated pinned memory?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Modified and updated, Done.

@r-abishek r-abishek added the enhancement New feature or request label Feb 18, 2026
@r-abishek r-abishek changed the base branch from develop to ar/dropout_grid_cutout February 18, 2026 23:25
@RooseweltMcW
Copy link
Copy Markdown
Author

@r-abishek Resolved review comments

@r-abishek r-abishek merged commit 3f1c095 into r-abishek:ar/dropout_grid_cutout Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants