Skip to content

Conversation

r-abishek
Copy link
Member

This is a audio test suite QA PR to:

  • Replace input audio samples with the new MIVisionX-data samples.
  • Regenerate golden outputs for all RPP audio functionality.
  • Modify the input params to match the new input audio-sample dimensions.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the audio test suite to support new MIVisionX-data samples by replacing input audio samples and regenerating golden outputs for RPP audio functionality. The changes include updating input parameters to match new audio sample dimensions and standardizing buffer calculations.

  • Replace hardcoded buffer sizes with defined constants for better maintainability
  • Update golden output values for Non Silent Region Detection to match new audio samples
  • Modify input parameters (dimensions, sample rates) to align with new test dataset
  • Standardize error return codes across HOST and HIP implementations

Reviewed Changes

Copilot reviewed 3 out of 17 changed files in this pull request and generated 1 comment.

File Description
utilities/test_suite/rpp_test_suite_audio.h Defines new constants and updates golden output values for new audio samples
utilities/test_suite/HOST/Tensor_audio_host.cpp Updates buffer calculations, sample rates, and tensor dimensions for new dataset
utilities/test_suite/HIP/Tensor_audio_hip.cpp Applies similar updates to HIP implementation with consistent changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #616      +/-   ##
===========================================
- Coverage    88.39%   88.38%   -0.01%     
===========================================
  Files          195      195              
  Lines        82768    82768              
===========================================
- Hits         73156    73148       -8     
- Misses        9612     9620       +8     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kiritigowda kiritigowda self-assigned this Sep 22, 2025
descriptorPtr3D->dataType = RpptDataType::F32;
descriptorPtr3D->dims[0] = batchSize;
descriptorPtr3D->dims[1] = maxSrcWidth;
descriptorPtr3D->dims[1] = (maxSrcWidth / 8) * 8 + 8; // Ensure a consistent dimension order between generic and typed descriptors to prevent errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this is needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was to ensure descriptor dims[1] is maxSrcWidth or higher, but a multiple of 8 for vectorized versions

Copy link
Contributor

@rrawther rrawther Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then (maxSrcWidth + 8) & ^7 would be better and more efficient

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@rrawther rrawther left a 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

{
iBufferSize = (Rpp64u)MEL_FILTER_BANK_MAX_HEIGHT * (Rpp64u)srcDescPtr->w * (Rpp64u)srcDescPtr->c * (Rpp64u)srcDescPtr->n;
oBufferSize = (Rpp64u)MEL_FILTER_BANK_MAX_HEIGHT * (Rpp64u)dstDescPtr->w * (Rpp64u)dstDescPtr->c * (Rpp64u)dstDescPtr->n;
iBufferSize = (Rpp64u)AUDIO_MAX_HEIGHT * (Rpp64u)srcDescPtr->w * (Rpp64u)srcDescPtr->c * (Rpp64u)srcDescPtr->n;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think MEL_FILTER_BANK_MAX_HEIGHT is better name here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

inRateTensor[i] = 16000;
outRateTensor[i] = 16000 * 1.15f;
inRateTensor[i] = 44100;
outRateTensor[i] = 44100 * 1.15f;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is 1.15 stand for? Please write comment and use ENUM. I think we need to take sample_rate as a parameter instead of hardcoding

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these have been changed to #defines -> SAMPLE_RATE * RESAMPLE_BUFFER_SCALE_FACTOR

{"sample1", {0, 35840}},
{"sample2", {0, 33680}},
{"sample3", {0, 34160}}
{"sample1", {0, 507150}},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this hardcoded numbers stand for. If this depends on the input. we need to extract it from there or user has to provide

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are now removed

{
inRateTensor[i] = 16000;
outRateTensor[i] = 16000 * 1.15f;
inRateTensor[i] = SAMPLE_RATE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we take these as parameters instead? What if a user want to use different audio samples with different sample_rate and scale_factor

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@rrawther rrawther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added few more comments

Copy link
Contributor

@rrawther rrawther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants