Dropout (Channel) on HIP and HOST#634
Conversation
r-abishek
commented
Nov 4, 2025
- 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
…all the bitdepths
indentation modified
… as constant for better understanding, added required comments
…d the HOST backend double free fault
Codecov Report❌ Patch coverage is
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
🚀 New features to boost your workflow:
|
| rpp::Handle &handle) | ||
| { | ||
| if (roiType == RpptRoiType::LTRB) | ||
| hip_exec_roi_converison_ltrb_to_xywh(roiTensorPtrSrc, handle); |
There was a problem hiding this comment.
Please fix the typo in the function name _converison_ -> _conversion_
There was a problem hiding this comment.
This issue is prevalent across files. Will issue a common fix PR for the same. Thanks
There was a problem hiding this comment.
Why do we need a separate PR for fixing the typo?
There was a problem hiding this comment.
@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 |
There was a problem hiding this comment.
All the randomization has to happen outside the kernel from the calling function
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
As mentioned above this need to happen outside the kernel from the caller
rrawther
left a comment
There was a problem hiding this comment.
waiting for the random dropout change before merge
Channel Dropout Resolved review comments
|
@rrawther , the random dropout changes were made as discussed. Thanks |
* 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>