Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPP Voxel Flip on HIP and HOST #285

Merged
merged 44 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f1ed6fe
added support for flip voxel
sampath1117 Dec 25, 2023
549af1d
added test suite support
sampath1117 Dec 25, 2023
d5c000c
added golden outputs for flip voxel
sampath1117 Dec 25, 2023
06cf595
updated golden outputs with correct values
sampath1117 Dec 25, 2023
6ee761b
minor bug fix in the hip test suite
sampath1117 Dec 25, 2023
0eb77be
Merge branch 'master' into sr/flip_voxel_pr
sampath1117 Dec 28, 2023
ec1be95
made changes to variable names for better readability
sampath1117 Jan 15, 2024
9c1a963
combined the flip axis factor as ternary operator in HIP kernel
sampath1117 Jan 15, 2024
989504c
Merge pull request #213 from sampath1117/sr/flip_voxel_pr
r-abishek Jan 16, 2024
a7f17f7
RPP Test Suite Upgrade 4 - CSV to BIN conversions for file size reduc…
r-abishek Jan 26, 2024
3c351c5
Merge branch 'develop' into sr/flip_voxel_pr_changes
sampath1117 Jan 29, 2024
a8610de
converted flip voxel golden outputs to bin files
sampath1117 Jan 29, 2024
c6bb38f
changed copyright from 2023 to 2024
sampath1117 Jan 29, 2024
afd30db
Merge pull request #226 from sampath1117/sr/flip_voxel_pr_changes
r-abishek Jan 29, 2024
b76b910
Update flip_voxel.hpp license
r-abishek Jan 31, 2024
a1f4213
License - updates to 2024 and consistency changes (#298)
r-abishek Jan 31, 2024
7096c1d
Test - Update README.md for test_suite (#299)
r-abishek Jan 31, 2024
6c34f1d
Merge branch 'master' of https://github.com/GPUOpen-ProfessionalCompu…
r-abishek Feb 1, 2024
07a5f66
Bump rocm-docs-core[api_reference] from 0.33.0 to 0.33.1 in /docs/sph…
dependabot[bot] Feb 6, 2024
a5e5679
Bump rocm-docs-core[api_reference] from 0.33.1 to 0.33.2 in /docs/sph…
dependabot[bot] Feb 7, 2024
e8aa6b2
Update doc codeowners (#303)
samjwu Feb 8, 2024
a921332
Documentation - Bump rocm-docs-core[api_reference] from 0.33.2 to 0.3…
dependabot[bot] Feb 9, 2024
30bed4e
Test suite - upgrade 5 qa perf (#305)
kiritigowda Feb 9, 2024
5c423ab
RPP Color Temperature on HOST and HIP (#271)
r-abishek Feb 9, 2024
df6e2c9
RPP Voxel 3D Tensor Add/Subtract scalar on HOST and HIP (#272)
r-abishek Feb 9, 2024
a4ed137
RPP Magnitude on HOST and HIP (#278)
r-abishek Feb 14, 2024
1976cbf
Bump rocm-docs-core[api_reference] from 0.34.0 to 0.34.2 in /docs/sph…
dependabot[bot] Feb 16, 2024
ec8f2f0
RPP Tensor Audio Support - Down Mixing (#296)
r-abishek Feb 16, 2024
29a5c82
RPP Voxel 3D Tensor Multiply scalar on HOST and HIP (#306)
r-abishek Feb 16, 2024
98a3c82
Test Suite Bugfix (#307)
r-abishek Feb 16, 2024
608225b
Bump rocm-docs-core[api_reference] from 0.34.2 to 0.35.0 in /docs/sph…
dependabot[bot] Feb 23, 2024
a7ef385
RPP Reduction - Tensor min and Tensor max on HOST and HIP (#260)
r-abishek Feb 24, 2024
473cde4
CI - Update precheckin.groovy
kiritigowda Feb 24, 2024
787b6ed
added separate kernels for doing flip when horizontal flip is not set
sampath1117 Mar 1, 2024
ae41eba
Merge remote-tracking branch 'abishek_rpp/develop' into sr/flip_pr_ch…
sampath1117 Mar 1, 2024
1bede26
fixed build issue
sampath1117 Mar 1, 2024
f014ef3
Merge branch 'master' of https://github.com/GPUOpen-ProfessionalCompu…
r-abishek Mar 6, 2024
dc05835
Add supported case
r-abishek Mar 6, 2024
dbe96d5
Merge branch 'master' of https://github.com/ROCm/rpp
sampath1117 Mar 7, 2024
d277d7f
merge with master
sampath1117 Mar 7, 2024
acfb923
reverted incorrect changes happened with merge
sampath1117 Mar 7, 2024
28bc8d9
Merge branch 'ar/flip_voxel' into sr/flip_pr_changes
sampath1117 Mar 7, 2024
c8ff635
Merge pull request #240 from sampath1117/sr/flip_pr_changes
r-abishek Mar 12, 2024
3b81723
Merge branch 'develop' of https://github.com/ROCm/rpp into ar/flip_voxel
r-abishek Mar 16, 2024
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
4 changes: 3 additions & 1 deletion include/rppdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ typedef enum
/*! \brief Not enough memory \ingroup group_rppdefs */
RPP_ERROR_NOT_ENOUGH_MEMORY = -16,
/*! \brief Out of bound source ROI \ingroup group_rppdefs */
RPP_ERROR_OUT_OF_BOUND_SRC_ROI = -17
RPP_ERROR_OUT_OF_BOUND_SRC_ROI = -17,
/*! \brief src and dst layout mismatch \ingroup group_rppdefs */
RPP_ERROR_SRC_DST_LAYOUT_MISMATCH = -18
} RppStatus;

/*! \brief RPP rppStatus_t type enums
Expand Down
66 changes: 54 additions & 12 deletions include/rppt_tensor_geometric_augmentations.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,16 +446,16 @@ RppStatus rppt_phase_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDesc
* \details This function performs slice augmentation on a generic 4D tensor.
* Slice augmentation involves selecting a region of interest (ROI) from the source tensor
* and copying it to the destination tensor. Support added for f32 -> f32 and u8 -> u8 dataypes.
* \param[in] srcPtr source tensor memory
* \param[in] srcPtr source tensor in HOST memory
* \param[in] srcGenericDescPtr source tensor descriptor
* \param[out] dstPtr destination tensor memory
* \param[out] dstPtr destination tensor in HOST memory
* \param[in] dstGenericDescPtr destination tensor descriptor
* \param[in] roiGenericPtrSrc ROI data for each image in source tensor (tensor of batchSize RpptRoiGeneric values)
* \param[in] roiType ROI type used (RpptRoi3DType::XYZWHD or RpptRoi3DType::LTFRBB)
* \param [in] rppHandle Host-handle
* \return <tt> RppStatus enum</tt>.
* \returns RPP_SUCCESS <tt>\ref RppStatus</tt> on successful completion.
* Else return RPP_ERROR
* \param [in] rppHandle RPP HOST handle created with <tt>\ref rppCreateWithBatchSize()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
* \ingroup group_tensor_geometric
*/
RppStatus rppt_slice_host(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle);
Expand All @@ -465,21 +465,63 @@ RppStatus rppt_slice_host(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr,
* \details This function performs slice augmentation on a generic 4D tensor.
* Slice augmentation involves selecting a region of interest (ROI) from the source tensor
* and copying it to the destination tensor. Support added for f32 -> f32 and u8 -> u8 dataypes.
* \param[in] srcPtr source tensor memory
* \param[in] srcPtr source tensor in HIP memory
* \param[in] srcGenericDescPtr source tensor descriptor
* \param[out] dstPtr destination tensor memory
* \param[out] dstPtr destination tensor in HIP memory
* \param[in] dstGenericDescPtr destination tensor descriptor
* \param[in] roiGenericPtrSrc ROI data for each image in source tensor (tensor of batchSize RpptRoiGeneric values)
* \param[in] roiType ROI type used (RpptRoi3DType::XYZWHD or RpptRoi3DType::LTFRBB)
* \param [in] rppHandle HIP-handle
* \return <tt> RppStatus enum</tt>.
* \returns RPP_SUCCESS <tt>\ref RppStatus</tt> on successful completion.
* Else return RPP_ERROR
* \param [in] rppHandle RPP HIP handle created with <tt>\ref rppCreateWithStreamAndBatchSize()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
* \ingroup group_tensor_geometric
*/
RppStatus rppt_slice_gpu(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle);
#endif // GPU_SUPPORT

/*! \brief Flip voxel augmentation HOST
* \details The flip voxel augmentation performs a mask-controlled horizontal/vertical/depth flip on a generic 4D tensor.
<br> Support added for f32 -> f32 and u8 -> u8 dataypes.
* \param[in] srcPtr source tensor in HOST memory
* \param[in] srcGenericDescPtr source tensor descriptor (Restrictions - numDims = 5, offsetInBytes >= 0, dataType = U8/F32, layout = NCDHW/NDHWC, c = 1/3)
* \param[out] dstPtr destination tensor in HOST memory
* \param[in] dstGenericDescPtr destination tensor descriptor (Restrictions - numDims = 5, offsetInBytes >= 0, dataType = U8/F32, layout = NCDHW/NDHWC, c = 1/3)
* \param [in] horizontalTensor horizontal flag values to set horizontal flip on/off (1D tensor in HOST memory, of size batchSize, with horizontalTensor[i] = 0/1)
* \param [in] verticalTensor vertical flag values to set vertical flip on/off (1D tensor in HOST memory, of size batchSize, with verticalTensor[i] = 0/1)
* \param [in] depthTensor depth flag values to set depth flip on/off (1D tensor in HOST memory, of size batchSize, with depthTensor[i] = 0/1)
* \param[in] roiGenericPtrSrc ROI data for each image in source tensor (tensor of batchSize RpptRoiGeneric values)
* \param[in] roiType ROI type used (RpptRoi3DType::XYZWHD or RpptRoi3DType::LTFRBB)
* \param [in] rppHandle RPP HOST handle created with <tt>\ref rppCreateWithBatchSize()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
* \ingroup group_tensor_geometric
*/
RppStatus rppt_flip_voxel_host(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, Rpp32u *depthTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle);

#ifdef GPU_SUPPORT
/*! \brief Flip voxel augmentation GPU
* \details The flip voxel augmentation performs a mask-controlled horizontal/vertical/depth flip on a generic 4D tensor.
<br> Support added for f32 -> f32 and u8 -> u8 dataypes.
* \param[in] srcPtr source tensor in HIP memory
* \param[in] srcGenericDescPtr source tensor descriptor (Restrictions - numDims = 5, offsetInBytes >= 0, dataType = U8/F32, layout = NCDHW/NDHWC, c = 1/3)
* \param[out] dstPtr destination tensor in HIP memory
* \param[in] dstGenericDescPtr destination tensor descriptor (Restrictions - numDims = 5, offsetInBytes >= 0, dataType = U8/F32, layout = NCDHW/NDHWC, c = 1/3)
* \param [in] horizontalTensor horizontal flag values to set horizontal flip on/off (1D tensor in pinned/HOST memory, of size batchSize, with horizontalTensor[i] = 0/1)
* \param [in] verticalTensor vertical flag values to set vertical flip on/off (1D tensor in pinned/HOST memory, of size batchSize, with verticalTensor[i] = 0/1)
* \param [in] depthTensor depth flag values to set depth flip on/off (1D tensor in pinned/HOST memory, of size batchSize, with depthTensor[i] = 0/1)
* \param[in] roiGenericPtrSrc ROI data for each image in source tensor (tensor of batchSize RpptRoiGeneric values)
* \param[in] roiType ROI type used (RpptRoi3DType::XYZWHD or RpptRoi3DType::LTFRBB)
* \param [in] rppHandle RPP HIP handle created with <tt>\ref rppCreateWithStreamAndBatchSize()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
* \ingroup group_tensor_geometric
*/
RppStatus rppt_flip_voxel_gpu(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, Rpp32u *depthTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle);
#endif // GPU_SUPPORT

/*! @}
*/

Expand Down
1 change: 1 addition & 0 deletions src/modules/cpu/host_tensor_geometric_augmentations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ THE SOFTWARE.
#include "kernel/warp_affine.hpp"
#include "kernel/phase.hpp"
#include "kernel/slice.hpp"
#include "kernel/flip_voxel.hpp"

#endif // HOST_TENSOR_GEOMETRIC_AUGMENTATIONS_HPP
Loading