Skip to content

Dropout (Channel) on HIP and HOST#634

Merged
kiritigowda merged 95 commits intoROCm:developfrom
r-abishek:ar/dropout_channel
Jan 5, 2026
Merged

Dropout (Channel) on HIP and HOST#634
kiritigowda merged 95 commits intoROCm:developfrom
r-abishek:ar/dropout_channel

Conversation

@r-abishek
Copy link
Copy Markdown
Member

  • Adds Channel Dropout augmentation 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
… as constant for better understanding, added required comments
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 99.68354% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/modules/tensor/hip/kernel/channel_dropout.cpp 98.46% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #634      +/-   ##
===========================================
+ Coverage    88.20%   88.36%   +0.16%     
===========================================
  Files          195      197       +2     
  Lines        82723    83047     +324     
===========================================
+ Hits         72964    73383     +419     
+ Misses        9759     9664      -95     
Files with missing lines Coverage Δ
api/rppdefs.h 71.72% <ø> (ø)
src/include/common/hip/rpp_hip_load_store.hpp 100.00% <ø> (ø)
src/modules/tensor/cpu/kernel/channel_dropout.cpp 100.00% <100.00%> (ø)
...dules/tensor/rppt_tensor_effects_augmentations.cpp 96.18% <100.00%> (+1.51%) ⬆️
src/modules/tensor/hip/kernel/channel_dropout.cpp 98.46% <98.46%> (ø)

... and 2 files with indirect coverage changes

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

rpp::Handle &handle)
{
if (roiType == RpptRoiType::LTRB)
hip_exec_roi_converison_ltrb_to_xywh(roiTensorPtrSrc, handle);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please fix the typo in the function name _converison_ -> _conversion_

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This issue is prevalent across files. Will issue a common fix PR for the same. Thanks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we need a separate PR for fixing the typo?

Copy link
Copy Markdown
Member Author

@r-abishek r-abishek Dec 3, 2025

Choose a reason for hiding this comment

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

@rrawther The same function call is used in many instances - all are fixed in #645 now.
Thanks @AryanSalmanpour

dstPtrImage = dstPtr + batchCount * dstDescPtr->strides.nStride;

uint8_t *maskPtr = scratchBuffer + batchCount * srcDescPtr->c;
int seed = randomSeed ? std::random_device{}() : DROPOUT_FIXED_SEED; // Use a true random seed if requested, otherwise use the fixed seed for deterministic QA
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All the randomization has to happen outside the kernel from the calling function

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dropoutProbability and randomSeed have now been removed from arguments.
RPP won't be responsible for the randomization part.

#pragma omp parallel for num_threads(numThreads)
for (int batchCount = 0; batchCount < dstDescPtr->n; batchCount++)
{
std::mt19937 gen(seed + batchCount);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As mentioned above this need to happen outside the kernel from the caller

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 some 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.

waiting for the random dropout change before merge

@Srihari-mcw
Copy link
Copy Markdown
Contributor

@rrawther , the random dropout changes were made as discussed. Thanks

@kiritigowda kiritigowda merged commit fd7f1b7 into ROCm:develop Jan 5, 2026
13 checks passed
HazarathKumarM added a commit to HazarathKumarM/rpp that referenced this pull request Jan 6, 2026
* Optimized version of channel dropout HIP backend and working code for HOST AVX, SSE

* Modified name for dropout compute function

* Modified way of AVX and SSE version channel dropout to avoid if statments

* Modified Channel Dropout with generic compute code reused

* Parameters and name change for channel dropout

* Modified HIP for better performance

* Modified the code and made the channel dropout templated version for all the bitdepths

* Added output image and modified the .h file to effects for channel dropout

* added space

* Resolved all review comments and modified code to produce results for i8 variant

* Removed empty line

* Resolved review comments

* Modified HOST after merge

* Made changes after merging and QA passed for dropout

* Channel dropout make_float 4 macro changes

* Updated QA with random generator and updated BIN files

* Modified QA name changes

* Modified RandomSeed value passed as parameter to the function call

* Update rppt_tensor_effects_augmentations.cpp

indentation modified

* Removed space and review comments resolved

* channel dropout implementation

* Resolved all the review comments and modified the magic number to set as constant for better understanding, added required comments

* Merged branch from develop and resolved merge conflicts

* Removed empty space

* Updated omp loop for better performance

* Updated hip channel dropout code for PKD version

* Updated change after merge

* Packaging - Remove Meta Package dependency (ROCm#610)

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Test Package - Add cmake deps (ROCm#617)

* Solarize augmentation - HOST and HIP (ROCm#605)

* Solarize HIP and HOST implementation

* cleanup the code and fix pkd3-pkd3 performance

* Add golden output and doxygen comments

* Add cheks for Threshold param

* modified case num for solarize

* minor fix

* fix load/store calls

* Address review comments

* minor fix

---------

Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Maddisetty <hmaddise@ctr2-alola-login-01.amd.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Docs - Bump rocm-docs-core[api_reference] from 1.24.1 to 1.25.0 in /docs/sphinx (ROCm#622)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.24.1 to 1.25.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.25.0/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.24.1...v1.25.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Warning fixes for HIP Backend - Check return status (ROCm#606)

* Initial hip memory fixes

* Further hip warning fixes

* Default build warning fixes - group III

---------

Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Docs - Bump rocm-docs-core[api_reference] from 1.25.0 to 1.26.0 in /docs/sphinx (ROCm#623)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.26.0/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.25.0...v1.26.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.26.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ROCm 7.1 - Changelog updates (ROCm#625)

* HIP - Remove unnecessary int load/stores (ROCm#621)

* Initial changes for tensor sum for PLN1 and PKD3 variants U8

* Make changes for rest of the bit depths and layouts

* Remove unused pack functions

* Adjust comments

* Initial cleanup

* Further cleanup

* Remove unused functions

* Address copilot comments

* Further standardize comments

* Standardize comments spacing in functions affected

---------

Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* CXX Compiler - Support TheRock (ROCm#630)

* Test Suite - Enums for bit depth, output format and layout (ROCm#608)

* removed numbers for bitdepths and output toggle

* Add layout enum and replicate changes to HOST testsuite

* Fix copilot review comments

* resolve review comments

* Apply suggestion from @Copilot

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

* minor bugfix

* minor bugfix

* minor fix

---------

Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Docs - Bump rocm-docs-core[api_reference] from 1.26.0 to 1.27.0 in /docs/sphinx (ROCm#632)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Packaging - Remove Meta Package dependency (ROCm#610)

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Test Package - Add cmake deps (ROCm#617)

* Docs - Bump rocm-docs-core[api_reference] from 1.24.1 to 1.25.0 in /docs/sphinx (ROCm#622)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.24.1 to 1.25.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.25.0/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.24.1...v1.25.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Docs - Bump rocm-docs-core[api_reference] from 1.25.0 to 1.26.0 in /docs/sphinx (ROCm#623)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.26.0/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.25.0...v1.26.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.26.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* HIP - Remove unnecessary int load/stores (ROCm#621)

* Initial changes for tensor sum for PLN1 and PKD3 variants U8

* Make changes for rest of the bit depths and layouts

* Remove unused pack functions

* Adjust comments

* Initial cleanup

* Further cleanup

* Remove unused functions

* Address copilot comments

* Further standardize comments

* Standardize comments spacing in functions affected

---------

Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* CXX Compiler - Support TheRock (ROCm#630)

* Test Suite - Enums for bit depth, output format and layout (ROCm#608)

* removed numbers for bitdepths and output toggle

* Add layout enum and replicate changes to HOST testsuite

* Fix copilot review comments

* resolve review comments

* Apply suggestion from @Copilot

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

* minor bugfix

* minor bugfix

* minor fix

---------

Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Docs - Bump rocm-docs-core[api_reference] from 1.26.0 to 1.27.0 in /docs/sphinx (ROCm#632)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Modified enum changed for the test suite for dropout

* Updated enum changes for dropout

* Update utilities/test_suite/HOST/runImageTests.py

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

* Update utilities/test_suite/HIP/runImageTests.py

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

* Update utilities/test_suite/HOST/runImageTests.py

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

* Update utilities/test_suite/HIP/runImageTests.py

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

* Update utilities/test_suite/HOST/Tensor_image_host.cpp

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

* Update src/modules/tensor/rppt_tensor_effects_augmentations.cpp

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

* Update src/modules/tensor/rppt_tensor_effects_augmentations.cpp

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

* Docs - Bump rocm-docs-core[api_reference] from 1.24.1 to 1.25.0 in /docs/sphinx (ROCm#622)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.24.1 to 1.25.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.25.0/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.24.1...v1.25.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ROCm 7.1 - Changelog updates (ROCm#625)

* Resolved copilot review comments for channel dropout

* Reverted back the dropoutTypeCases

* Updated and resolved reivew comments

* Modified common.py file for channel dropout

* Reverted changes

* Updated common.py changes

* updated channel dropout and resolved review comments

* Updated random mask in API level

* Updated seed to be passed from test suite

* Updated Random generator in test suite level

* updated name for every instances

* Resolved review comments

* Resolved Review comments and modified HIP code

* Updated and resolved review comments

* Modified datatype for channel dropout Hip backend

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: sampath117 <snehaa@multicorewareinc.com>
Co-authored-by: RooseweltMcW <austin.roosewelt@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Maddisetty <hmaddise@ctr2-alola-login-01.amd.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

10 participants