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

Color temperature HOST kernel bug fix #285

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions include/rppt_tensor_color_augmentations.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,15 @@ RppStatus rppt_lut_gpu(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
* \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] adjustmentValueTensor adjustment values for color temperature calculation (1D tensor of size sizeof(Rpp8s) * batchSize with -100 <= adjustmentValueTensor[i] >= 100 for each image in batch)
* \param [in] adjustmentValueTensor adjustment values for color temperature calculation (1D tensor of size batchSize with -100 <= adjustmentValueTensor[i] >= 100 for each image in batch)
* \param [in] roiTensorSrc 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.
*/
RppStatus rppt_color_temperature_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp8s *adjustmentValueTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle);
RppStatus rppt_color_temperature_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *adjustmentValueTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle);

#ifdef GPU_SUPPORT
/*! \brief Color Temperature augmentation on HIP backend for a NCHW/NHWC layout tensor
Expand All @@ -448,7 +448,7 @@ RppStatus rppt_color_temperature_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, R
* \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] adjustmentValueTensor adjustment values for color temperature calculation (1D tensor of size sizeof(Rpp8s) * batchSize with -100 <= adjustmentValueTensor[i] >= 100 for each image in batch)
* \param [in] adjustmentValueTensor adjustment values for color temperature calculation (1D tensor of size batchSize with -100 <= adjustmentValueTensor[i] >= 100 for each image in batch)
* \param [in] roiTensorSrc 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>
Expand Down
8 changes: 4 additions & 4 deletions src/modules/cpu/kernel/color_temperature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RppStatus color_temperature_u8_u8_host_tensor(Rpp8u *srcPtr,
RpptDescPtr srcDescPtr,
Rpp8u *dstPtr,
RpptDescPtr dstDescPtr,
Rpp8s *adjustmentValueTensor,
Rpp32s *adjustmentValueTensor,
RpptROIPtr roiTensorPtrSrc,
RpptRoiType roiType,
RppLayoutParams layoutParams)
Expand Down Expand Up @@ -269,7 +269,7 @@ RppStatus color_temperature_f32_f32_host_tensor(Rpp32f *srcPtr,
RpptDescPtr srcDescPtr,
Rpp32f *dstPtr,
RpptDescPtr dstDescPtr,
Rpp8s *adjustmentValueTensor,
Rpp32s *adjustmentValueTensor,
RpptROIPtr roiTensorPtrSrc,
RpptRoiType roiType,
RppLayoutParams layoutParams)
Expand Down Expand Up @@ -508,7 +508,7 @@ RppStatus color_temperature_f16_f16_host_tensor(Rpp16f *srcPtr,
RpptDescPtr srcDescPtr,
Rpp16f *dstPtr,
RpptDescPtr dstDescPtr,
Rpp8s *adjustmentValueTensor,
Rpp32s *adjustmentValueTensor,
RpptROIPtr roiTensorPtrSrc,
RpptRoiType roiType,
RppLayoutParams layoutParams)
Expand Down Expand Up @@ -799,7 +799,7 @@ RppStatus color_temperature_i8_i8_host_tensor(Rpp8s *srcPtr,
RpptDescPtr srcDescPtr,
Rpp8s *dstPtr,
RpptDescPtr dstDescPtr,
Rpp8s *adjustmentValueTensor,
Rpp32s *adjustmentValueTensor,
RpptROIPtr roiTensorPtrSrc,
RpptRoiType roiType,
RppLayoutParams layoutParams)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rppt_tensor_color_augmentations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ RppStatus rppt_color_temperature_host(RppPtr_t srcPtr,
RpptDescPtr srcDescPtr,
RppPtr_t dstPtr,
RpptDescPtr dstDescPtr,
Rpp8s *adjustmentValueTensor,
Rpp32s *adjustmentValueTensor,
RpptROIPtr roiTensorPtrSrc,
RpptRoiType roiType,
rppHandle_t rppHandle)
Expand Down
2 changes: 1 addition & 1 deletion utilities/test_suite/HOST/Tensor_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ int main(int argc, char **argv)
{
testCaseName = "color_temperature";

Rpp8s adjustment[batchSize];
Rpp32s adjustment[batchSize];
for (i = 0; i < batchSize; i++)
adjustment[i] = 70;

Expand Down