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 Tensor Support - Fisheye on HOST and HIP #346

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
12bc18f
added initial api support for fisheye HIP kernel
sampath1117 Sep 10, 2024
1b764d2
added initial HIP support for PKD3-PKD3 variant
sampath1117 Sep 10, 2024
f88165e
added ROI support
sampath1117 Sep 12, 2024
1857a7f
added support for remaining layout variants
sampath1117 Sep 12, 2024
1bd58c7
added few comments in the code
sampath1117 Sep 12, 2024
1518df5
added initial api support for fisheye HOST kernel
sampath1117 Sep 16, 2024
50859a9
added initial code for fishey src loc compute and support for U8 PKD3…
sampath1117 Sep 16, 2024
cd85784
added support for reamining layout variants in U8
sampath1117 Sep 23, 2024
df9cb87
added support for F16 bitdepth
sampath1117 Sep 23, 2024
88e253e
added support for F32 and I8 bitdepths in HOST
sampath1117 Sep 25, 2024
e34e0e4
Merge branch 'develop' into sr/opt_fisheye
sampath1117 Sep 25, 2024
13fdc30
added the versioning changes
sampath1117 Sep 26, 2024
1745580
added fisheye output image in doxygen
sampath1117 Sep 26, 2024
287ae33
added golden outputs
sampath1117 Sep 26, 2024
49282b8
Merge with develop
HazarathKumarM Nov 19, 2024
4f68499
Merge remote-tracking branch 'develop' into sr/opt_fisheye
HazarathKumarM Nov 19, 2024
2113c51
Fixes on the QA Failure on the HOST side
HazarathKumarM Nov 22, 2024
f7ab4dd
Merge branch 'develop' into opt_fisheye
HazarathKumarM Dec 13, 2024
c4014c4
Changes in Test suite
HazarathKumarM Dec 13, 2024
27bddad
Minor changes due to merge conflits
HazarathKumarM Dec 13, 2024
8b40e87
Merge branch 'develop' into sr/opt_fisheye
HazarathKumarM Jan 3, 2025
d5d9095
Minor changes based on the review commands
HazarathKumarM Jan 6, 2025
041890e
Docs - Bump rocm-docs-core[api_reference] from 1.14.1 to 1.15.0 in /d…
dependabot[bot] Jan 30, 2025
9e1e777
Merge branch 'develop' into sr/opt_fisheye
HazarathKumarM Feb 3, 2025
3cd9cb5
Changes due to merge conflits
HazarathKumarM Feb 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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Full documentation for RPP is available at [https://rocm.docs.amd.com/projects/r
* RPP Warp Perspective on HOST and HIP
* RPP Tensor Bitwise-XOR support on HOST and HIP
* RPP Threshold on HOST and HIP
* RPP Tensor Fisheye support on HOST and HIP

## (Unreleased) RPP 1.9.4

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/sphinx/requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rocm-docs-core[api_reference]==1.14.1
rocm-docs-core[api_reference]==1.15.0
2 changes: 1 addition & 1 deletion docs/sphinx/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ requests==2.32.3
# via
# pygithub
# sphinx
rocm-docs-core[api-reference]==1.14.1
rocm-docs-core[api-reference]==1.15.0
# via -r requirements.in
rpds-py==0.22.3
# via
Expand Down
41 changes: 41 additions & 0 deletions include/rppt_tensor_geometric_augmentations.h
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,47 @@ RppStatus rppt_transpose_host(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDesc
RppStatus rppt_transpose_gpu(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *permTensor, Rpp32u *roiTensor, rppHandle_t rppHandle);
#endif // GPU_SUPPORT

/*! \brief Fisheye augmentation on HOST backend for a NCHW/NHWC layout tensor
* \details The Fisheye augmentation applies fisheye effect 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 geometric_augmentations_fisheye_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] 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 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_fisheye_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle);

#ifdef GPU_SUPPORT
/*! \brief Fisheye augmentation on HIP backend for a NCHW/NHWC layout tensor
* \details The Fisheye augmentation applies fisheye effect 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 geometric_augmentations_fisheye_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] 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 rppCreateWithStreamAndBatchSize()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
*/
RppStatus rppt_fisheye_gpu(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle);
#endif // GPU_SUPPORT

/*! @}
*/

Expand Down
2 changes: 2 additions & 0 deletions src/include/cpu/rpp_cpu_simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ const __m256 avx_p255 = _mm256_set1_ps(255.0f);
const __m256 avx_p1op255 = _mm256_set1_ps(1.0f / 255.0f);
const __m256 avx_p1op3 = _mm256_set1_ps(1.0f / 3.0f);
const __m256 avx_p2op3 = _mm256_set1_ps(2.0f / 3.0f);
const __m256 avx_pMinus1 = _mm256_set1_ps(-1.0f);
const __m256 avx_p1op2 = _mm256_set1_ps(0.5f);

const __m256i avx_cephesSQRTHF = _mm256_set1_ps(0.707106781186547524);
const __m256i avx_cephesLogP0 = _mm256_set1_ps(7.0376836292E-2);
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 @@ -40,5 +40,6 @@ SOFTWARE.
#include "kernel/crop_and_patch.hpp"
#include "kernel/flip_voxel.hpp"
#include "kernel/warp_perspective.hpp"
#include "kernel/fisheye.hpp"

#endif // HOST_TENSOR_GEOMETRIC_AUGMENTATIONS_HPP
Loading