-
Notifications
You must be signed in to change notification settings - Fork 0
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
Audio PR 8 - Resample + Operator Overloading Nodes #34
base: swbs_m3/audio/pr6
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address review comments
return node; | ||
} | ||
|
||
VX_API_ENTRY vx_node VX_API_CALL vxExtRppTensorMulScalar(vx_graph graph, vx_tensor pSrc, vx_tensor pDst, vx_scalar scalar_value, vx_uint32 nbatchSize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it necessary to pass batchsize as a param to this function?
for other functions, i have not seen batchsize being passed as a separate argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nBatchSize is not used in this function, so I think it is safe to remove
vx_node node = NULL; | ||
vx_context context = vxGetContext((vx_reference)graph); | ||
if (vxGetStatus((vx_reference)context) == VX_SUCCESS) { | ||
vx_uint32 dev_type = getGraphAffinity(graph); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change dev_type to deviceType
vx_node node = NULL; | ||
vx_context context = vxGetContext((vx_reference)graph); | ||
if (vxGetStatus((vx_reference)context) == VX_SUCCESS) { | ||
vx_uint32 dev_type = getGraphAffinity(graph); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment. change dev_type to deviceType
data->pDstRoi[i].xywhROI.xy.x = data->pSrcRoi[i].xywhROI.xy.x; | ||
data->pDstRoi[i].xywhROI.xy.y = data->pSrcRoi[i].xywhROI.xy.y; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be need not here. Remember this has been removed with preemphasis too
Please check with @swetha097
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, here we are just copying src roi to dst roi so we need not do this @SundarRajan28 please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So please do not pass the pDstRoi to this node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are setting the dstROI values from srcROI in this function. @swetha097 should this be removed?
return status; | ||
} | ||
|
||
static vx_status VX_CALLBACK validateTensorAddTensor(vx_node node, const vx_reference parameters[], vx_uint32 num, vx_meta_format metas[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this "num" variable if not used
I am seeing unused in most of the audio PR's. Please check and remove this if not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its used in all openvx extensions so this may be a syntax for the openvx extensions
//! \brief The kernel target support callback. | ||
// TODO::currently the node is setting the same affinity as context. This needs to change when we have hubrid modes in the same graph | ||
static vx_status VX_CALLBACK query_target_support(vx_graph graph, vx_node node, | ||
vx_bool use_opencl_1_2, // [input] false: OpenCL driver is 2.0+; true: OpenCL driver is 1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the OpenCL related comments
#include "internal_publishKernels.h" | ||
#include "vx_ext_amd.h" | ||
#define NUM_OF_DIMS 5 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is vx_ext_amd.h and NUM_OF_DIMS needed to be declared here?
cl_mem cl_pDst; | ||
#elif ENABLE_HIP | ||
void *hip_pSrc; | ||
void *hip_pDst; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't require HIP and OpenCL related variables in new changes done in all openvx nodes
I am not able to see this variables in brightness.cpp
https://github.com/swetha097/MIVisionX/blob/swbs_m5/audio/pr8/amd_openvx_extensions/amd_rpp/source/tensor/Brightness.cpp
Please check and remove this
RppPtr_t pDst; | ||
float quality; | ||
uint maxDstWidth; | ||
RpptDescPtr src_desc_ptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change variables from snake case to camel case.
Please check brightness and make the required changes
https://github.com/swetha097/MIVisionX/blob/swbs_m5/audio/pr8/amd_openvx_extensions/amd_rpp/source/tensor/Brightness.cpp
@@ -161,6 +161,9 @@ list(APPEND SOURCES | |||
source/tensor/WarpAffine.cpp | |||
source/tensor/SequenceRearrange.cpp | |||
source/tensor/PreemphasisFilter.cpp | |||
source/tensor/Resample.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add in Alphabetical order itself
VX_KERNEL_RPP_TODECIBELS = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x77, | ||
VX_KERNEL_RPP_RESAMPLE = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x78, | ||
VX_KERNEL_RPP_TENSORMULSCALAR = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x79, | ||
VX_KERNEL_RPP_TENSORADDTENSOR = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After 79 it is 7a
@@ -1919,6 +1919,55 @@ extern "C" | |||
*/ | |||
SHARED_PUBLIC vx_node VX_API_CALL vxExtRppToDecibels(vx_graph graph, vx_tensor pSrc, vx_tensor pSrcRoi, vx_tensor pDst, vx_scalar cutOffDB, vx_scalar multiplier, vx_scalar referenceMagnitude); | |||
|
|||
/*! \brief [Graph] Creates a RPP Resample function node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change it to better description like, Produces a resampled output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check other functions
/*! \brief [Graph] Creates a RPP Resample function node. | ||
* \ingroup group_amd_rpp | ||
* \param [in] graph The handle to the graph. | ||
* \param [in] pSrc The input tensor in <tt>\ref VX_TYPE_UINT8<tt> or <tt>\ref VX_TYPE_FLOAT32<tt> or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the supported data types and correct it for pSrc and pDst
* <tt>\ref VX_TYPE_FLOAT16<tt> or <tt>\ref VX_TYPE_INT8<tt> format data. | ||
* \param [out] pDst The output tensor in <tt>\ref VX_TYPE_UINT8<tt> or <tt>\ref VX_TYPE_FLOAT32<tt> or | ||
* <tt>\ref VX_TYPE_FLOAT16<tt> or <tt>\ref VX_TYPE_INT8<tt> format data. | ||
* \param [in] pSrcDims The input tensor of batch size in <tt>unsigned int<tt> containing the roi values for the input in xywh/ltrb format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it contains ROI rename it as pSrcRoi and pDstROI, Also remove the xywh/ltrb format
Please remove from Spectrogram also it is not changed
size_t tensor_dims[RPP_MAX_TENSOR_DIMS]; | ||
vx_enum tensor_type; | ||
STATUS_ERROR_CHECK(vxQueryTensor((vx_tensor)parameters[1], VX_TENSOR_NUMBER_OF_DIMS, &num_tensor_dims, sizeof(num_tensor_dims))); | ||
if (num_tensor_dims < 3) return ERRMSG(VX_ERROR_INVALID_DIMENSION, "validate TensorMulScalar: tensor #0 dimensions=%lu (must be greater than or equal to 3)\n", num_tensor_dims); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it is tensor #1 please change
STATUS_ERROR_CHECK(vxQueryNode(node, VX_NODE_LOCAL_DATA_PTR, &data, sizeof(data))); | ||
refreshTensorMulScalar(node, parameters, num, data); | ||
if (data->deviceType == AGO_TARGET_AFFINITY_GPU) { | ||
#if ENABLE_OPENCL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine OCL and HIP
status = VX_ERROR_NOT_IMPLEMENTED; | ||
#endif | ||
} else if (data->deviceType == AGO_TARGET_AFFINITY_CPU) { | ||
if (data->inputTensorType == vx_type_e::VX_TYPE_FLOAT32 && data->outputTensorType == vx_type_e::VX_TYPE_FLOAT32) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else return some unsupported status
data->tensorSize = 1; | ||
for (int i = 0; i < num_of_dims; i++) | ||
data->tensorSize *= tensor_dims[i]; | ||
if (data->inputTensorType == vx_type_e::VX_TYPE_FLOAT32 && data->outputTensorType == vx_type_e::VX_TYPE_FLOAT32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else throw some error, or return unsupported status
} | ||
|
||
//! \brief The kernel target support callback. | ||
// TODO::currently the node is setting the same affinity as context. This needs to change when we have hubrid modes in the same graph |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change spelling of hubrid to hybrid, applicable to other new files as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address review comments for Resample OpenVX
source/tensor/ToDecibels.cpp | ||
source/tensor/Vignette.cpp | ||
source/tensor/WarpAffine.cpp | ||
source/tensor/SequenceRearrange.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why sequence rearrange is deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is present twice
RpptDescPtr pSrcDesc; | ||
RpptDescPtr pDstDesc; | ||
Rpp32s *pSampleFrames; | ||
Rpp32s *pSampleChannels; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frames and channels are combined into single RPP Tensor in latest resample kernel
Please combine these in rocAL too
https://github.com/ROCm/rpp/blob/ea7c9f14d8773a2c1b359b679869403e26789438/src/modules/cpu/kernel/resample.hpp#L35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this addressed?
if (data->pInRateTensor[i] != 0) | ||
scale_ratio = data->pOutRateTensor[i] / static_cast<float>(data->pInRateTensor[i]); | ||
else | ||
scale_ratio = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use it as a ternary operator here
scale_ratio = (data->pInRateTensor[i] != 0) ? (data->pOutRateTensor[i] / static_cast<float>(data->pInRateTensor[i])) : 0;
Ideally if scale_ratio is 0, we need to throw an error
scale_ratio = data->pOutRateTensor[i] / static_cast<float>(data->pInRateTensor[i]); | ||
else | ||
scale_ratio = 0; | ||
dst_roi[i].xywhROI.roiWidth = (int)std::ceil(scale_ratio * src_roi[i].xywhROI.roiWidth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a static cast instead of c style casting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also since this is Audio, inferring the ROI as width and height does not seem right to me, Please check Sundar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using .roiWidth and .roiHeight in all the audio openvx extensions
else | ||
scale_ratio = 0; | ||
dst_roi[i].xywhROI.roiWidth = (int)std::ceil(scale_ratio * src_roi[i].xywhROI.roiWidth); | ||
dst_roi[i].xywhROI.roiHeight = src_roi[i].xywhROI.roiHeight; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Height should be interpreted as samples and width should be interpreted as channels
So this should be ideally changed
Please check with @swetha097 for further clarifications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variables are named like this in RpptROI struct
#if ENABLE_OPENCL | ||
return VX_ERROR_NOT_IMPLEMENTED; | ||
#elif ENABLE_HIP | ||
return VX_ERROR_NOT_IMPLEMENTED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine HIP and OpenCL and return single error
} | ||
if (data->deviceType == AGO_TARGET_AFFINITY_CPU) { | ||
rpp_status = rppt_resample_host(data->pSrc, data->pSrcDesc, data->pDst, data->pDstDesc, | ||
data->pInRateTensor, data->pOutRateTensor, data->pSampleFrames, data->window, data->handle->rppHandle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to combine frames and channels and pass a single tensor
This code will not work, since only frames is passed here
int lobes = std::round(0.007 * data->quality * data->quality - 0.09 * data->quality + 3); | ||
int lookupSize = lobes * 64 + 1; | ||
windowed_sinc(data->window, lookupSize, lobes); | ||
refreshResample(node, parameters, num, data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check and remove this refreshResample since in process, refreshResample is called anyway
data->pDstDesc->offsetInBytes = 0; | ||
fillAudioDescriptionPtrFromDims(data->pDstDesc, data->outputTensorDims); | ||
|
||
data->pSampleFrames = static_cast<signed int *>(calloc(data->pSrcDesc->n, sizeof(unsigned int))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incase of HIP backend
Would suggest to have this buffers in pinned memory, which is what might be needed
Please check with @snehaa8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the comments and add changes
@@ -147,7 +147,9 @@ list(APPEND SOURCES | |||
source/tensor/Nop.cpp | |||
source/tensor/Rotate.cpp | |||
source/tensor/Pixelate.cpp | |||
source/tensor/PreemphasisFilter.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this to PreEmphasis filter PR?
source/tensor/ToDecibels.cpp | ||
source/tensor/Vignette.cpp | ||
source/tensor/WarpAffine.cpp | ||
source/tensor/SequenceRearrange.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is present twice
(vx_reference)pSrc1, | ||
(vx_reference)pSrc2, | ||
(vx_reference)pDst, | ||
(vx_reference)srcRoi, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to pSrcRoi and pDstRoi
* \param [in] pSrc2 The input tensor2 in <tt>\ref VX_TYPE_FLOAT32<tt> format data. | ||
* \param [out] pDst The output tensor in <tt>\ref VX_TYPE_FLOAT32<tt> format data. | ||
* \param [in] pSrcRoi The input tensor of batch size in <tt>unsigned int<tt> containing the roi values for the input1. | ||
* \param [in] pDstRoi The input tensor of batch size in <tt>unsigned int<tt> containing the roi values for the input2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the ROI for tensor 2?
Please check it and rename accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the ROI for the output tensor
RpptDescPtr pSrcDesc; | ||
RpptDescPtr pDstDesc; | ||
Rpp32s *pSampleFrames; | ||
Rpp32s *pSampleChannels; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this addressed?
if (data->pSampleFrames != nullptr) free(data->pSampleFrames); | ||
if (data->pSampleChannels != nullptr) free(data->pSampleChannels); | ||
if (data->pInRateTensor != nullptr) free(data->pInRateTensor); | ||
delete (data->pSrcDesc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove brackets
ResampleLocalData *data; | ||
STATUS_ERROR_CHECK(vxQueryNode(node, VX_NODE_LOCAL_DATA_PTR, &data, sizeof(data))); | ||
STATUS_ERROR_CHECK(releaseRPPHandle(node, data->handle, data->deviceType)); | ||
if (data->pSampleFrames != nullptr) free(data->pSampleFrames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use only delete and new operator
fillAudioDescriptionPtrFromDims(data->pDstDesc, data->outputTensorDims); | ||
|
||
data->pSampleFrames = static_cast<signed int *>(calloc(data->pSrcDesc->n, sizeof(unsigned int))); | ||
data->pSampleChannels = static_cast<signed int *>(calloc(data->pSrcDesc->n, sizeof(unsigned int))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use new operator instead of calloc
scale_ratio = data->pOutRateTensor[i] / static_cast<float>(data->pInRateTensor[i]); | ||
else | ||
scale_ratio = 0; | ||
dst_roi[i].xywhROI.roiWidth = (int)std::ceil(scale_ratio * src_roi[i].xywhROI.roiWidth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also since this is Audio, inferring the ROI as width and height does not seem right to me, Please check Sundar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address all review comments from Sampath
f2afb28
to
02e9f66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address review comments
window.lookup[i + 1] = w; | ||
} | ||
window.center = center + 1; | ||
window.scale = 1 / scale; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change 1/scale as 1.0f/scale as per rajys comment
|
||
static vx_status VX_CALLBACK refreshResample(vx_node node, const vx_reference *parameters, vx_uint32 num, ResampleLocalData *data) { | ||
vx_status status = VX_SUCCESS; | ||
int nDim = 2; // Num dimensions for audio tensor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why nDim =2 is hardcoded here?
STATUS_ERROR_CHECK(vxQueryTensor((vx_tensor)parameters[2], VX_TENSOR_BUFFER_HOST, &roi_tensor_ptr_src, sizeof(roi_tensor_ptr_src))); | ||
STATUS_ERROR_CHECK(vxQueryTensor((vx_tensor)parameters[3], VX_TENSOR_BUFFER_HOST, &roi_tensor_ptr_dst, sizeof(roi_tensor_ptr_dst))); | ||
if (!data->pSrcRoi) { | ||
data->pSrcRoi = new Rpp32s[data->pSrcDesc->n * nDim]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be done in initialize not refresh?
RpptROI *src_roi = reinterpret_cast<RpptROI *>(roi_tensor_ptr_src); | ||
RpptROI *dst_roi = reinterpret_cast<RpptROI *>(roi_tensor_ptr_dst); | ||
update_destination_roi(data, src_roi, dst_roi); | ||
for (unsigned i = 0; i < data->pSrcDesc->n; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format the loop as per comment in downmixing pr
#32 (comment)
if (data->pSrcDesc) delete data->pSrcDesc; | ||
if (data->pDstDesc) delete data->pDstDesc; | ||
STATUS_ERROR_CHECK(releaseRPPHandle(node, data->handle, data->deviceType)); | ||
if (data) delete data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the validity of data also before delete
STATUS_ERROR_CHECK(vxQueryTensor((vx_tensor)parameters[1], VX_TENSOR_DATA_TYPE, &data->inTensorType, sizeof(data->inTensorType))); | ||
STATUS_ERROR_CHECK(vxQueryTensor((vx_tensor)parameters[2], VX_TENSOR_DATA_TYPE, &data->outTensorType, sizeof(data->outTensorType))); | ||
|
||
refreshTensorAddTensor(node, parameters, num, data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this refresh since this should be called in process anyway
Rpp32u deviceType; | ||
RppPtr_t pSrc; | ||
RppPtr_t pDst; | ||
float scalarValueFloat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove Float from variable name
just have it as scalarValue
size_t num_tensor_dims; | ||
STATUS_ERROR_CHECK(vxQueryTensor((vx_tensor)parameters[0], VX_TENSOR_NUMBER_OF_DIMS, &num_tensor_dims, sizeof(num_tensor_dims))); | ||
|
||
// Validate for output parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there no validation of num_tensor_dims needed here?
float *srcPtrTemp = static_cast<float *>(data->pSrc); | ||
float *dstPtrTemp = static_cast<float *>(data->pDst); | ||
uint bufferLength = data->tensorSize / sizeof(float); | ||
uint alignedLength = (bufferLength / 8) * 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address this comment
https://github.com/swetha097/MIVisionX/pull/34/files#r1546423884
data->tensorSize *= sizeof(float); | ||
else | ||
return VX_ERROR_NOT_SUPPORTED; | ||
refreshTensorMulScalar(node, parameters, num, data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this refresh since anyway called in process node
* Bump rocm-docs-core[api_reference] from 0.34.0 to 0.34.2 in /docs/sphinx (ROCm#1286) Bumps [rocm-docs-core[api_reference]](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.34.0 to 0.34.2. - [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v0.34.0...v0.34.2) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump cryptography from 42.0.0 to 42.0.2 in /docs/sphinx (ROCm#1289) Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.0 to 42.0.2. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@42.0.0...42.0.2) --- updated-dependencies: - dependency-name: cryptography dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add PreEmphasis filter support * Fix ROI - change from xy to width & height * Adding openvx changes for downmix node * Audio Augmentations 1 PR - NSR and Spectrogram * Revert "Adding openvx changes for downmix node" This reverts commit d53f81d. * Merging swbs_m2/audio/pr5 into swbs_m3/audio/pr6 * Fixing build issues * PR comments resolution in the PreEmphais Filter * Minor Changes * Change the borderType enum to int32 from uint32 dtype * Fix validation of preemphasis * Remove the memcopy of the src and dest rois as it can be handled in the rocAL - since the src and dst rois remain same * Formatting change - minor * Remove NSR * Minor formatting changes * Minor fix * Minor update - remove the 2nd instance of preemphasis filter * Add openvx extensions for to_decibels augmentations * Enum dtype - change from uint to int * Remove roi_tensor_ptr_dst as its unused after latest changes * Remove the dst_roi arg from vxExtRppPreemphasisFilter call as its unused * Add MFB to MIVisisonX * Revert "Add MFB to MIVisisonX" This reverts commit dc4200b. * Fixing issues with src ROI * Resolve the PR comments * Resolving review comments * Resolving review comments * Change the dims[0] and dims[1] positioning for Spectrogram and AudioFillDescPointers * Removing dstROI from to_decibels openvx augmentation * Change function name to camelCase * Resolving review comments * Revert "Change the dims[0] and dims[1] positioning for Spectrogram and AudioFillDescPointers" This reverts commit 886d6af. * Fix Spectrogram * Docs - update TOC for API Ref (ROCm#1327) * Bump rocm-docs-core[api_reference] from 0.38.0 to 0.38.1 in /docs/sphinx (ROCm#1328) Bumps [rocm-docs-core[api_reference]](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.38.0 to 0.38.1. - [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v0.38.0...v0.38.1) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update CHANGELOG.md * Update CHANGELOG.md * Documents - Bump idna from 3.4 to 3.7 in /docs/sphinx (ROCm#1330) Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](kjd/idna@v3.4...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update changelog * Update changelog * Resolve minor PR comments * Remove comments * Docs - Bump tqdm from 4.65.0 to 4.66.3 in /docs/sphinx (ROCm#1339) Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.65.0 to 4.66.3. - [Release notes](https://github.com/tqdm/tqdm/releases) - [Commits](tqdm/tqdm@v4.65.0...v4.66.3) --- updated-dependencies: - dependency-name: tqdm dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Docs - Bump jinja2 from 3.1.3 to 3.1.4 in /docs/sphinx (ROCm#1340) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](pallets/jinja@3.1.3...3.1.4) --- updated-dependencies: - dependency-name: jinja2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Find Half - Fix (ROCm#1341) * MIVisionX Setup - Updates (ROCm#1343) * SWDEV-459739 - Remove the package obsolete setting (ROCm#1345) The package was obsoleting itself and was causing upgrade issues. Removed the same. * Fix the layout issue with spec * Add layouts for Audio in vxTensorLayout Remove spectrogram layout param and pass layout in descriptor * Check the validity of pointers * Audio PR - Augmentation support [ Spectrogram ] (ROCm#1319) * Bump rocm-docs-core[api_reference] from 0.34.0 to 0.34.2 in /docs/sphinx (ROCm#1286) Bumps [rocm-docs-core[api_reference]](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.34.0 to 0.34.2. - [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v0.34.0...v0.34.2) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump cryptography from 42.0.0 to 42.0.2 in /docs/sphinx (ROCm#1289) Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.0 to 42.0.2. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@42.0.0...42.0.2) --- updated-dependencies: - dependency-name: cryptography dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add PreEmphasis filter support * Fix ROI - change from xy to width & height * Adding openvx changes for downmix node * Audio Augmentations 1 PR - NSR and Spectrogram * Revert "Adding openvx changes for downmix node" This reverts commit d53f81d. * PR comments resolution in the PreEmphais Filter * Minor Changes * Change the borderType enum to int32 from uint32 dtype * Fix validation of preemphasis * Remove the memcopy of the src and dest rois as it can be handled in the rocAL - since the src and dst rois remain same * Formatting change - minor * Remove NSR * Minor formatting changes * Minor fix * Minor update - remove the 2nd instance of preemphasis filter * Enum dtype - change from uint to int * Remove roi_tensor_ptr_dst as its unused after latest changes * Remove the dst_roi arg from vxExtRppPreemphasisFilter call as its unused * Add MFB to MIVisisonX * Revert "Add MFB to MIVisisonX" This reverts commit dc4200b. * Resolve the PR comments * Change the dims[0] and dims[1] positioning for Spectrogram and AudioFillDescPointers * Change function name to camelCase * Revert "Change the dims[0] and dims[1] positioning for Spectrogram and AudioFillDescPointers" This reverts commit 886d6af. * Fix Spectrogram * Docs - update TOC for API Ref (ROCm#1327) * Bump rocm-docs-core[api_reference] from 0.38.0 to 0.38.1 in /docs/sphinx (ROCm#1328) Bumps [rocm-docs-core[api_reference]](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.38.0 to 0.38.1. - [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v0.38.0...v0.38.1) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update CHANGELOG.md * Update CHANGELOG.md * Documents - Bump idna from 3.4 to 3.7 in /docs/sphinx (ROCm#1330) Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](kjd/idna@v3.4...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update changelog * Resolve minor PR comments * Remove comments * Fix the layout issue with spec * Check the validity of pointers --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: root <root@ixt-sjc2-54.local.lan> Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com> Co-authored-by: SundarRajan28 <sundarrajan@multicorewareinc.com> Co-authored-by: Swetha B S <swetha@multiocrewareinc.com> Co-authored-by: randyh62 <42045079+randyh62@users.noreply.github.com> * Introduce API to obtain RPP layout * Add comments * Resolving review comments * Resolving review comments * Minor changes * Removing if blocks for CPU device checks * Use RPP_AUDIO flag to disable RPP audio calls * Add RPP_AUDIO flag for RPP audio API * Add Audio flag for PreEmphasis filter * Rename map variable --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: root <root@ixt-sjc2-54.local.lan> Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com> Co-authored-by: Swetha B S <swetha@multicorewareinc.com> Co-authored-by: SundarRajan28 <sundarrajan@multicorewareinc.com> Co-authored-by: Swetha B S <swetha@multiocrewareinc.com> Co-authored-by: randyh62 <42045079+randyh62@users.noreply.github.com> Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com> Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com> Co-authored-by: raramakr <91213141+raramakr@users.noreply.github.com> Co-authored-by: fiona-gladwin <fionagladwin@multicorewareinc.com> Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com> Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
No description provided.