Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
e32bbdb
Optimized version of channel dropout HIP backend and working code for…
snehaa8 Aug 22, 2025
a1fdab1
Modified name for dropout compute function
snehaa8 Aug 22, 2025
4c7e1a1
Modified way of AVX and SSE version channel dropout to avoid if statm…
snehaa8 Aug 22, 2025
5747ea0
Modified Channel Dropout with generic compute code reused
snehaa8 Aug 25, 2025
133236a
Parameters and name change for channel dropout
snehaa8 Aug 25, 2025
1fb450e
Modified HIP for better performance
snehaa8 Aug 25, 2025
63491ac
Modified the code and made the channel dropout templated version for …
snehaa8 Aug 25, 2025
a374034
Added output image and modified the .h file to effects for channel dr…
snehaa8 Aug 26, 2025
709809d
added space
snehaa8 Aug 26, 2025
751cf48
Resolved all review comments and modified code to produce results for…
snehaa8 Aug 26, 2025
d597022
Removed empty line
snehaa8 Aug 26, 2025
4038129
Resolved review comments
snehaa8 Sep 9, 2025
24cada0
Merge remote-tracking branch 'tot/develop' into apr/channel_dropout
snehaa8 Sep 9, 2025
24968cf
Modified HOST after merge
snehaa8 Sep 9, 2025
cbc74c8
Made changes after merging and QA passed for dropout
snehaa8 Sep 9, 2025
1baa41e
Channel dropout make_float 4 macro changes
snehaa8 Sep 9, 2025
ac97a1e
Updated QA with random generator and updated BIN files
snehaa8 Sep 9, 2025
cd5c576
Modified QA name changes
snehaa8 Sep 9, 2025
09f993c
Modified RandomSeed value passed as parameter to the function call
snehaa8 Sep 10, 2025
da78859
Update rppt_tensor_effects_augmentations.cpp
RooseweltMcW Sep 10, 2025
f0e2195
Removed space and review comments resolved
snehaa8 Sep 12, 2025
a358937
channel dropout implementation
HazarathKumarM Sep 16, 2025
b9829b6
Resolved all the review comments and modified the magic number to set…
HazarathKumarM Sep 17, 2025
ebacdf8
Merge branch 'hk/channelDropout' into apr/channel_dropout and resolve…
HazarathKumarM Sep 24, 2025
70d8b1a
Merged branch from develop and resolved merge conflicts
HazarathKumarM Oct 3, 2025
b0a66cb
Merge remote-tracking branch 'origin/develop' into hk/channelDropout
HazarathKumarM Oct 3, 2025
8c728ed
Removed empty space
HazarathKumarM Oct 3, 2025
2b1450b
Updated omp loop for better performance
HazarathKumarM Oct 3, 2025
cafebfc
Merge branch 'apr/channel_dropout' into hk/channelDropout
HazarathKumarM Oct 3, 2025
5b1b0d4
Updated hip channel dropout code for PKD version
HazarathKumarM Oct 7, 2025
aebd0f2
Merge remote-tracking branch 'origin/develop' into hk/channelDropout
HazarathKumarM Oct 7, 2025
aaeb44a
Merge branch 'apr/channel_dropout' into hk/channelDropout
HazarathKumarM Oct 7, 2025
1f86bcb
Updated change after merge
HazarathKumarM Oct 9, 2025
1d7a5ea
Packaging - Remove Meta Package dependency (#610)
arvindcheru Sep 17, 2025
8229454
Test Package - Add cmake deps (#617)
kiritigowda Sep 23, 2025
2705724
Docs - Bump rocm-docs-core[api_reference] from 1.24.1 to 1.25.0 in /d…
dependabot[bot] Sep 26, 2025
fcaab7e
Docs - Bump rocm-docs-core[api_reference] from 1.25.0 to 1.26.0 in /d…
dependabot[bot] Oct 2, 2025
98594a5
HIP - Remove unnecessary int load/stores (#621)
r-abishek Oct 10, 2025
0a89798
CXX Compiler - Support TheRock (#630)
kiritigowda Oct 13, 2025
c1388cd
Test Suite - Enums for bit depth, output format and layout (#608)
r-abishek Oct 21, 2025
8064c42
Docs - Bump rocm-docs-core[api_reference] from 1.26.0 to 1.27.0 in /d…
dependabot[bot] Oct 28, 2025
0667231
Merge remote-tracking branch 'tot/develop' into hk/channelDropout
HazarathKumarM Oct 29, 2025
12e4748
Updated enum changes for dropout
HazarathKumarM Nov 4, 2025
70bc0b6
Update utilities/test_suite/HOST/runImageTests.py
r-abishek Nov 4, 2025
3e58b1c
Update utilities/test_suite/HIP/runImageTests.py
r-abishek Nov 4, 2025
04ae53c
Update utilities/test_suite/HOST/runImageTests.py
r-abishek Nov 4, 2025
3618027
Update utilities/test_suite/HIP/runImageTests.py
r-abishek Nov 4, 2025
298a5e9
Update utilities/test_suite/HOST/Tensor_image_host.cpp
r-abishek Nov 4, 2025
29b884f
Update src/modules/tensor/rppt_tensor_effects_augmentations.cpp
r-abishek Nov 4, 2025
0331596
Update src/modules/tensor/rppt_tensor_effects_augmentations.cpp
r-abishek Nov 4, 2025
436c865
Merge pull request #490 from HazarathKumarM/hk/channelDropout
r-abishek Nov 4, 2025
0cf95f8
Resolved copilot review comments for channel dropout
HazarathKumarM Nov 5, 2025
1b498ea
Reverted back the dropoutTypeCases
HazarathKumarM Nov 5, 2025
72ac3dd
Updated and resolved reivew comments
HazarathKumarM Nov 5, 2025
a9090c1
Modified common.py file for channel dropout
HazarathKumarM Nov 5, 2025
027ec47
Reverted changes
HazarathKumarM Nov 5, 2025
2189eb5
Updated common.py changes
HazarathKumarM Nov 5, 2025
c7a9bfc
Merge pull request #520 from RooseweltMcW/apr/dropout_channel
r-abishek Nov 5, 2025
27ef7bc
Merge branch 'develop' into ar/dropout_channel
kiritigowda Nov 13, 2025
bb19acd
Merge branch 'develop' into ar/dropout_channel
r-abishek Nov 13, 2025
1b0b869
Merge branch 'develop' into ar/dropout_channel
kiritigowda Nov 17, 2025
e007814
Merge branch 'develop' into ar/dropout_channel
kiritigowda Nov 25, 2025
0870847
Merge branch 'develop' into ar/dropout_channel
r-abishek Dec 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/rppdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const float ONE_OVER_3 = 1.0f / 3;
const float ONE_OVER_255 = 1.0f / 255;
const uint MMS_MAX_SCRATCH_MEMORY = 115293120; // maximum scratch memory size (in number of floats) needed for MMS buffer in RNNT training
const uint SPECTROGRAM_MAX_SCRATCH_MEMORY = 372877312; // maximum scratch memory size (in number of floats) needed for spectrogram HIP kernel in RNNT training
#define DROPOUT_FIXED_SEED 42 // Constant fixed seed for reproducing the dropout output

/******************** RPP typedefs ********************/

Expand Down
44 changes: 44 additions & 0 deletions api/rppt_tensor_effects_augmentations.h
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,50 @@ RppStatus rppt_solarize_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t d
RppStatus rppt_solarize_gpu(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *thresholdTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle);
#endif // GPU_SUPPORT

/*! \brief Channel dropout augmentation on HOST backend for a NCHW/NHWC layout tensor
* \details The channel dropout augmentation function erases one or more user defined channel from an image, for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.<br>
* - srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).
* - dstPtr depth ranges - Will be same depth as srcPtr.
* \image html img150x150.png Sample Input
* \image html effects_augmentations_channel_dropout_img150x150.png Sample Output
* \param [in] srcPtr source tensor in HOST memory
* \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 HOST 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] dropoutProbability dropout probability for channel dropout calculation (1D Rpp32f tensor in HOST memory, of size batchSize with 0 <= dropProb[i] <= 1 for each image in batch)
* \param [in] randomSeed randomSeed single bool to control the random number generator's seed ( 0 - Fixed seed for QA , 1 - random seed generated for randomness)
* \param [in] roiTensorPtrSrc ROI data in HOST memory, for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))
* \param [in] roiType ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)
* \param [in] rppHandle RPP HOST handle created with <tt>\ref rppCreate()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
*/
RppStatus rppt_channel_dropout_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *dropoutProbability, bool randomSeed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle);

#ifdef GPU_SUPPORT
/*! \brief Channel dropout augmentation on HIP backend for a NCHW/NHWC layout tensor
* \details The channel dropout augmentation function erases one or more user defined channel from an image, for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.<br>
* - srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).
* - dstPtr depth ranges - Will be same depth as srcPtr.
* \image html img150x150.png Sample Input
* \image html effects_augmentations_channel_dropout_img150x150.png Sample Output
* \param [in] srcPtr source tensor in HIP memory
* \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] dropoutProbability dropout probability for channel dropout calculation (1D Rpp32f tensor in HOST memory, of size batchSize with 0 <= dropProb[i] <= 1 for each image in batch)
* \param [in] randomSeed randomSeed single bool to control the random number generator's seed ( 0 - Fixed seed for QA , 1 - random seed generated for randomness)
* \param [in] roiTensorPtrSrc ROI data in HIP memory, for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))
* \param [in] roiType ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)
* \param [in] rppHandle RPP HIP handle created with <tt>\ref rppCreate()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
*/
RppStatus rppt_channel_dropout_gpu(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *dropoutProbability, bool randomSeed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle);
#endif // GPU_SUPPORT

/*! @}
*/

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/include/common/hip/rpp_hip_load_store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ struct RPPTensorFunctionMetaData
#define FLOAT4_ONE_OVER_255 make_float4(0.003921569f, 0.003921569f, 0.003921569f, 0.003921569f)
#define FLOAT4_255 make_float4(255.0f, 255.0f, 255.0f, 255.0f)
#define FLOAT4_128 make_float4(128.0f, 128.0f, 128.0f, 128.0f)
#define FLOAT4_I8_MIN_VALUE make_float4(-128.0f, -128.0f, -128.0f, -128.0f)
#define FLOAT4_ZERO make_float4(0.0f, 0.0f, 0.0f, 0.0f)
#define UINT2_ZERO make_uint2(0, 0)

Expand Down
13 changes: 13 additions & 0 deletions src/include/tensor/hip_tensor_executors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,19 @@ RppStatus hip_exec_solarize_tensor(T *srcPtr,
RpptRoiType roiType,
rpp::Handle& handle);

// -------------------- channel_dropout --------------------

template <typename T>
RppStatus hip_exec_channel_dropout_tensor(T *srcPtr,
RpptDescPtr srcDescPtr,
T *dstPtr,
RpptDescPtr dstDescPtr,
Rpp32f *dropoutProbability,
bool randomSeed,
RpptROIPtr roiTensorPtrSrc,
RpptRoiType roiType,
rpp::Handle& handle);

/**************************************** FILTER AUGMENTATIONS ****************************************/

// -------------------- box_filter --------------------
Expand Down
14 changes: 14 additions & 0 deletions src/include/tensor/host_tensor_executors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,20 @@ RppStatus posterize_f16_f16_host_tensor(Rpp16f *srcPtr,
RppLayoutParams layoutParams,
rpp::Handle& handle);

// -------------------- channel_dropout --------------------

template<typename T>
RppStatus channel_dropout_host_tensor(T *srcPtr,
RpptDescPtr srcDescPtr,
T *dstPtr,
RpptDescPtr dstDescPtr,
Rpp32f *dropoutProbability,
bool randomSeed,
RpptROIPtr roiTensorPtrSrc,
RpptRoiType roiType,
RppLayoutParams layoutParams,
rpp::Handle& handle);

/**************************************** FILTER AUGMENTATIONS ****************************************/

// -------------------- gaussian_filter --------------------
Expand Down
Loading