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 Audio Support - To Decibels #258

Merged
merged 84 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
6627464
Initial commit - Non slient region detection
snehaa8 Aug 3, 2023
dcd9833
Initial commit - To Decibels
snehaa8 Aug 3, 2023
3720c8f
Replace vectors with arrays
snehaa8 Aug 17, 2023
ed1e425
Cleanup
snehaa8 Aug 17, 2023
f7f51c8
Replace Rpp64s with Rpp32s
snehaa8 Aug 24, 2023
676de7c
Optimize and precompute cutOff
snehaa8 Aug 25, 2023
46b8fb5
Fix buffer used
snehaa8 Sep 4, 2023
11fb3ab
Fix buffer used
snehaa8 Sep 4, 2023
8e05043
Additional Cleanup
snehaa8 Sep 4, 2023
79d9e6f
Update testsuite for Audio
snehaa8 Sep 8, 2023
5719db9
code cleanup
HazarathKumarM Sep 12, 2023
4aad4d6
Add Readme file for Audio test suite
HazarathKumarM Sep 12, 2023
abf15d8
changes based on review comments
HazarathKumarM Sep 12, 2023
71ef2f5
minor change
HazarathKumarM Sep 12, 2023
adad92b
Remove unittest folders and updated README.md
HazarathKumarM Sep 14, 2023
8e01e0e
Remove unit tests
HazarathKumarM Sep 14, 2023
69fba3e
minor change
HazarathKumarM Sep 14, 2023
a7b1b22
code cleanup
sampath1117 Sep 20, 2023
441bfac
added common header file for audio helper functions
sampath1117 Sep 20, 2023
c8803c2
Merge remote-tracking branch 'abishek_rpp/master' into sn/nsr_host_te…
sampath1117 Sep 20, 2023
e7169fe
removed unncessary audio wav files
sampath1117 Sep 20, 2023
11b4709
removed log file
sampath1117 Sep 20, 2023
d64bc7b
added doxygen support for audio
sampath1117 Sep 21, 2023
23ba5a5
Merge branch 'sn/nsr_host_tensor' into sn/to_decibels
sampath1117 Sep 22, 2023
337ccc1
added doxygen changes for to_decibels
sampath1117 Sep 22, 2023
d1b5b41
updated test suite support for to_decibels
sampath1117 Sep 22, 2023
223de61
minor change
sampath1117 Sep 22, 2023
512a79f
removed the usage of getMax function and used std::max_element
sampath1117 Sep 27, 2023
6a18957
modularized code in test suite
sampath1117 Sep 27, 2023
c413836
merge with latest changes
sampath1117 Sep 27, 2023
2247696
minor change
sampath1117 Sep 27, 2023
527ed18
minor change
sampath1117 Sep 27, 2023
87b0138
Merge pull request #149 from snehaa8/sn/nsr_host_tensor
r-abishek Sep 27, 2023
8e2975d
resolved codacy warnings
sampath1117 Sep 28, 2023
b9f8c12
Merge pull request #174 from snehaa8/sn/nsr_host_tensor
r-abishek Sep 28, 2023
b22bf93
Codacy fix - Remove unused cpuTime
r-abishek Sep 28, 2023
4a5c357
CMakeLists - Version Update
kiritigowda Oct 23, 2023
2c8a78b
CHANGELOG Updates
kiritigowda Oct 23, 2023
f07786a
merge with latest changes
sampath1117 Oct 24, 2023
54cfa29
resolved issue with file_system dependency in test suite
sampath1117 Oct 24, 2023
c8bd726
Doxygen changes
sampath1117 Oct 24, 2023
92f8ed7
Merge pull request #182 from sampath1117/sr/nsr_pr_changes
r-abishek Oct 25, 2023
c4d8f3d
Merge branch 'develop' into ar/audio_support_1_non_silent_region
r-abishek Nov 1, 2023
1db1425
RPP RICAP Tensor for HOST and HIP (#213)
r-abishek Nov 1, 2023
1d3e7ce
Documentation - Readme & changelog updates (#251)
LisaDelaney Nov 1, 2023
13995ad
Merge branch 'ar/audio_support_1_non_silent_region' into sn/nsr_host_…
sampath1117 Nov 2, 2023
e85f581
added ctests for audio test suite for CI
sampath1117 Nov 2, 2023
296ed72
Merge pull request #187 from snehaa8/sn/nsr_host_tensor
r-abishek Nov 2, 2023
0aec6e1
Cmake mods for ctest
r-abishek Nov 2, 2023
3140717
HOST-only build error bugfix
r-abishek Nov 2, 2023
fe4ef51
Merge branch 'ar/audio_support_1_non_silent_region' into sn/nsr_host_…
sampath1117 Nov 3, 2023
0713890
added qa mode paramter to python audio script
sampath1117 Nov 3, 2023
e98a4e8
minor change
sampath1117 Nov 3, 2023
a1f7366
Documentation - Bump rocm-docs-core[api_reference] from 0.26.0 to 0.2…
dependabot[bot] Nov 3, 2023
749a552
RPP Resize Mirror Normalize Bugfix (#252)
r-abishek Nov 3, 2023
3f5aec6
Merge pull request #189 from snehaa8/sn/nsr_host_tensor
r-abishek Nov 3, 2023
1b466bc
added example for MMS calculation in comments for better understanding
sampath1117 Nov 7, 2023
38119f3
Sphinx - updates (#257)
kiritigowda Nov 7, 2023
b98bb99
updated info used to for running audio test suite
sampath1117 Nov 8, 2023
3795f37
removed bitdepth variable from audio test suite
sampath1117 Nov 10, 2023
58e1ff5
added more information on computing NSR outputs in the example added
sampath1117 Nov 10, 2023
64c52cd
Merge pull request #191 from snehaa8/sn/nsr_host_tensor
r-abishek Nov 13, 2023
6b2add5
Merge branch 'ar/audio_support_1_non_silent_region' of https://github…
r-abishek Nov 14, 2023
7753fda
Merge branch 'ar/audio_support_2_to_decibels' into sn/to_decibels
r-abishek Nov 14, 2023
072cc1e
Merge pull request #150 from snehaa8/sn/to_decibels
r-abishek Nov 14, 2023
d205055
Fix doxygen for decibels
snehaa8 Nov 15, 2023
f9c66a6
Merge pull request #195 from snehaa8/sn/to_decibels
r-abishek Nov 15, 2023
ce13b82
Fix build errors and qa tests in Audio Test suite
snehaa8 Nov 16, 2023
a90e280
Merge pull request #197 from snehaa8/sn/to_decibels
r-abishek Nov 16, 2023
8227726
Merge branch 'master' of https://github.com/GPUOpen-ProfessionalCompu…
r-abishek Nov 22, 2023
783ee98
Remove auto-merge repeated funcs
r-abishek Nov 22, 2023
2be82b1
Improve clarity on header docs
r-abishek Nov 22, 2023
1875d85
made changes based on review comments
sampath1117 Nov 28, 2023
132eaa6
stored golden outputs of to_decibels in binary file
sampath1117 Nov 30, 2023
9322cd0
removed unused parameter in verify_output function
sampath1117 Nov 30, 2023
b650f02
updated list of cases supported in python script
sampath1117 Nov 30, 2023
f3d0a7d
added error handling for opening golden output file
sampath1117 Nov 30, 2023
1135cbc
Merge pull request #202 from sampath1117/sr/to_decibels_pr_changes
r-abishek Nov 30, 2023
40f2cc9
Codacy fix and tests warning fix
r-abishek Dec 5, 2023
5aa53cb
Codacy fix
r-abishek Dec 5, 2023
8dc04bb
Codacy fix trial
r-abishek Dec 5, 2023
331f160
merge with latest changes
sampath1117 Dec 7, 2023
4ec92c6
codacy fix for checking boundaries of fstream
sampath1117 Dec 7, 2023
b7cf24f
Merge pull request #205 from sampath1117/sr/to_decibels_pr_changes
r-abishek Dec 7, 2023
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
17 changes: 17 additions & 0 deletions include/rppt_tensor_audio_augmentations.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,23 @@ extern "C" {
*/
RppStatus rppt_non_silent_region_detection_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, Rpp32s *srcLengthTensor, Rpp32f *detectedIndexTensor, Rpp32f *detectionLengthTensor, Rpp32f cutOffDB, Rpp32s windowLength, Rpp32f referencePower, Rpp32s resetInterval, rppHandle_t rppHandle);

/*! \brief To Decibels augmentation on HOST backend
* \details To Decibels augmentation for 1D audio buffer converts magnitude values to decibel values
* \param[in] srcPtr source tensor in HOST memory
* \param[in] srcDescPtr source tensor descriptor (Restrictions - numDims = 3, offsetInBytes >= 0, dataType = F32)
* \param[out] dstPtr destination tensor in HOST memory
* \param[in] dstDescPtr destination tensor descriptor (Restrictions - numDims = 3, offsetInBytes >= 0, dataType = F32)
* \param[in] srcDims source tensor sizes for each element in batch (2D tensor in HOST memory, of size batchSize * 2)
* \param[in] cutOffDB minimum or cut-off ratio in dB
* \param[in] multiplier factor by which the logarithm is multiplied
* \param[in] referenceMagnitude Reference magnitude if not provided maximum value of input used as reference
* \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_to_decibels_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr srcDims, Rpp32f cutOffDB, Rpp32f multiplier, Rpp32f referenceMagnitude, rppHandle_t rppHandle);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 1 addition & 0 deletions src/modules/cpu/host_tensor_audio_augmentations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ THE SOFTWARE.
#define HOST_TENSOR_AUDIO_AUGMENTATIONS_HPP

#include "kernel/non_silent_region_detection.hpp"
#include "kernel/to_decibels.hpp"

#endif // HOST_TENSOR_AUDIO_AUGMENTATIONS_HPP
106 changes: 106 additions & 0 deletions src/modules/cpu/kernel/to_decibels.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/*
Copyright (c) 2019 - 2023 Advanced Micro Devices, Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include "rppdefs.h"
#include <omp.h>

RppStatus to_decibels_host_tensor(Rpp32f *srcPtr,
RpptDescPtr srcDescPtr,
Rpp32f *dstPtr,
RpptDescPtr dstDescPtr,
RpptImagePatchPtr srcDims,
Rpp32f cutOffDB,
Rpp32f multiplier,
Rpp32f referenceMagnitude,
rpp::Handle& handle)
{
Rpp32u numThreads = handle.GetNumThreads();

// Calculate the intermediate values needed for DB conversion
Rpp32f minRatio = std::pow(10, cutOffDB / multiplier);
if(minRatio == 0.0f)
minRatio = std::nextafter(0.0f, 1.0f);

const Rpp32f log10Factor = 0.3010299956639812; //1 / std::log(10);
multiplier *= log10Factor;

omp_set_dynamic(0);
#pragma omp parallel for num_threads(numThreads)
for(int batchCount = 0; batchCount < srcDescPtr->n; batchCount++)
{
Rpp32f *srcPtrCurrent = srcPtr + batchCount * srcDescPtr->strides.nStride;
Rpp32f *dstPtrCurrent = dstPtr + batchCount * dstDescPtr->strides.nStride;

Rpp32u height = srcDims[batchCount].height;
Rpp32u width = srcDims[batchCount].width;
Rpp32f refMag = referenceMagnitude;

// Compute maximum value in the input buffer
if(!referenceMagnitude)
{
refMag = -std::numeric_limits<Rpp32f>::max();
Rpp32f *srcPtrTemp = srcPtrCurrent;
if(width == 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a case where width is 1?

Copy link
Contributor

@sampath1117 sampath1117 Nov 28, 2023

Choose a reason for hiding this comment

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

To decibels kernel can take both 1D and 2D inputs
width = 1 is considered 1D input, all other values of width is considered 2D inputs

refMag = std::max(refMag, *(std::max_element(srcPtrTemp, srcPtrTemp + height)));
else
{
for(int i = 0; i < height; i++)
{
refMag = std::max(refMag, *(std::max_element(srcPtrTemp, srcPtrTemp + width)));
srcPtrTemp += srcDescPtr->strides.hStride;
}
}
}

// Avoid division by zero
if(!refMag)
refMag = 1.0f;

Rpp32f invReferenceMagnitude = 1.f / refMag;
Copy link
Contributor

Choose a reason for hiding this comment

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

please combine the above statement in this line : if inv = refMag? 1./ref : 1;
Also keep in mind that precalculating this can result in precision loss

// Interpret as 1D array
if(width == 1)
{
for(Rpp32s vectorLoopCount = 0; vectorLoopCount < height; vectorLoopCount++)
Copy link
Contributor

Choose a reason for hiding this comment

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

are we planning to optimize this in AVX

Copy link
Contributor

@sampath1117 sampath1117 Nov 28, 2023

Choose a reason for hiding this comment

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

Hi Rajy,
The computations involved in to_decibels uses this logarithm to the base 2
we initially had a AVX version using a approximation of logarithm since it is not available in the intel intrinsics
But that resulted in mismatches with golden outputs starting from 4th decimal which had a impact on accuracy

So we are forced to go back to Raw c code to make it match with reference outputs

*dstPtrCurrent++ = multiplier * std::log2(std::max(minRatio, (*srcPtrCurrent++) * invReferenceMagnitude));
}
else
{
Rpp32f *srcPtrRow, *dstPtrRow;
srcPtrRow = srcPtrCurrent;
dstPtrRow = dstPtrCurrent;
for(int i = 0; i < height; i++)
{
Rpp32f *srcPtrTemp, *dstPtrTemp;
srcPtrTemp = srcPtrRow;
dstPtrTemp = dstPtrRow;
Rpp32s vectorLoopCount = 0;
for(; vectorLoopCount < width; vectorLoopCount++)
*dstPtrTemp++ = multiplier * std::log2(std::max(minRatio, (*srcPtrTemp++) * invReferenceMagnitude));

srcPtrRow += srcDescPtr->strides.hStride;
dstPtrRow += dstDescPtr->strides.hStride;
}
}
}

return RPP_SUCCESS;
}
34 changes: 34 additions & 0 deletions src/modules/rppt_tensor_audio_augmentations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,37 @@ RppStatus rppt_non_silent_region_detection_host(RppPtr_t srcPtr,

return RPP_SUCCESS;
}

/******************** to_decibels ********************/

RppStatus rppt_to_decibels_host(RppPtr_t srcPtr,
RpptDescPtr srcDescPtr,
RppPtr_t dstPtr,
RpptDescPtr dstDescPtr,
RpptImagePatchPtr srcDims,
Rpp32f cutOffDB,
Rpp32f multiplier,
Rpp32f referenceMagnitude,
rppHandle_t rppHandle)
{
if (multiplier == 0)
return RPP_ERROR_ZERO_DIVISION;
if ((srcDescPtr->dataType == RpptDataType::F32) && (dstDescPtr->dataType == RpptDataType::F32))
{
to_decibels_host_tensor(static_cast<Rpp32f*>(srcPtr),
srcDescPtr,
static_cast<Rpp32f*>(dstPtr),
dstDescPtr,
srcDims,
cutOffDB,
multiplier,
referenceMagnitude,
rpp::deref(rppHandle));

return RPP_SUCCESS;
}
else
{
return RPP_ERROR_INVALID_SRC_OR_DST_DATATYPE;
}
}
2 changes: 1 addition & 1 deletion utilities/test_suite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ if(Python3_FOUND)

else()
message("-- ${Yellow}Test Warning: Python3 must be installed to run RPP test_suite successfully!${ColourReset}")
endif(Python3_FOUND)
endif(Python3_FOUND)
12 changes: 12 additions & 0 deletions utilities/test_suite/HIP/Tensor_hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,18 @@ int main(int argc, char **argv)
double wallTime;
string testCaseName;

if(testCase == 82 && imagesMixed)
{
std::cerr<<"\n RICAP only works with same dimension images";
exit(0);
}

if(testCase == 82 && batchSize < 2)
{
std::cerr<<"\n RICAP only works with BatchSize > 1";
exit(0);
}

// Initialize buffers for any reductionType functions
void *reductionFuncResultArr;
Rpp32u reductionFuncResultArrLength = srcDescPtr->n * 4;
Expand Down
12 changes: 12 additions & 0 deletions utilities/test_suite/HOST/Tensor_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,18 @@ int main(int argc, char **argv)
double cpuTime, wallTime;
string testCaseName;

if(testCase == 82 && imagesMixed)
{
std::cerr<<"\n RICAP only works with same dimension images";
exit(0);
}

if(testCase == 82 && batchSize < 2)
{
std::cerr<<"\n RICAP only works with BatchSize > 1";
exit(0);
}

// Initialize buffers for any reductionType functions
void *reductionFuncResultArr;
Rpp32u reductionFuncResultArrLength = srcDescPtr->n * 4;
Expand Down
57 changes: 52 additions & 5 deletions utilities/test_suite/HOST/Tensor_host_audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ int main(int argc, char **argv)
noOfAudioFiles = audioNames.size();
}

// initialize the buffers for audio length and channels
Rpp32s *srcLengthTensor = (Rpp32s *) calloc(batchSize, sizeof(Rpp32s));
Rpp32s *channelsTensor = (Rpp32s *) calloc(batchSize, sizeof(Rpp32s));

// find max audio dimensions in the input dataset
maxSrcHeight = 1;
maxDstHeight = 1;
Expand All @@ -114,10 +110,18 @@ int main(int argc, char **argv)
iBufferSize = (Rpp64u)srcDescPtr->h * (Rpp64u)srcDescPtr->w * (Rpp64u)srcDescPtr->c * (Rpp64u)srcDescPtr->n;
oBufferSize = (Rpp64u)dstDescPtr->h * (Rpp64u)dstDescPtr->w * (Rpp64u)dstDescPtr->c * (Rpp64u)dstDescPtr->n;

// initialize host buffers for input & output
// allocate host buffers for input & output
Rpp32f *inputf32 = (Rpp32f *)calloc(iBufferSize, sizeof(Rpp32f));
Rpp32f *outputf32 = (Rpp32f *)calloc(oBufferSize, sizeof(Rpp32f));

// allocate the buffers for audio length and channels
Rpp32s *srcLengthTensor = (Rpp32s *) calloc(batchSize, sizeof(Rpp32s));
Rpp32s *channelsTensor = (Rpp32s *) calloc(batchSize, sizeof(Rpp32s));

// allocate the buffers for src/dst dimensions for each element in batch
RpptImagePatch *srcDims = (RpptImagePatch *) calloc(batchSize, sizeof(RpptImagePatch));
RpptImagePatch *dstDims = (RpptImagePatch *) calloc(batchSize, sizeof(RpptImagePatch));

// run case-wise RPP API and measure time
rppHandle_t handle;
rppCreateWithBatchSize(&handle, srcDescPtr->n, 3);
Expand Down Expand Up @@ -155,6 +159,24 @@ int main(int argc, char **argv)

break;
}
case 1:
{
testCaseName = "to_decibels";
Rpp32f cutOffDB = std::log(1e-20);
Rpp32f multiplier = std::log(10);
Rpp32f referenceMagnitude = 1.0f;

for (int i = 0; i < batchSize; i++)
{
srcDims[i].height = dstDims[i].height = srcLengthTensor[i];
srcDims[i].width = dstDims[i].width = 1;
}

startWallTime = omp_get_wtime();
rppt_to_decibels_host(inputf32, srcDescPtr, outputf32, dstDescPtr, srcDims, cutOffDB, multiplier, referenceMagnitude, handle);

break;
}
default:
{
missingFuncFlag = 1;
Expand All @@ -173,6 +195,29 @@ int main(int argc, char **argv)
maxWallTime = std::max(maxWallTime, wallTime);
minWallTime = std::min(minWallTime, wallTime);
avgWallTime += wallTime;

// QA mode - verify outputs with golden outputs. Below code doesn’t run for performance tests
if (testType == 0)
{
/* Run only if testCase is not 0
For testCase 0 verify_non_silent_region_detection function is used for QA testing */
if (testCase != 0)
verify_output(outputf32, dstDescPtr, dstDims, testCaseName, audioNames, dst);

/* Dump the outputs to csv files for debugging
Runs only if
1. DEBUG_MODE is enabled
2. Current iteration is 1st iteration
3. Test case is not 0 */
if (DEBUG_MODE && iterCount == 0 && testCase != 0)
{
std::ofstream refFile;
refFile.open(func + ".csv");
for (int i = 0; i < oBufferSize; i++)
refFile << *(outputf32 + i) << "\n";
refFile.close();
}
}
}
}
rppDestroyHost(handle);
Expand All @@ -193,6 +238,8 @@ int main(int argc, char **argv)
// free memory
free(srcLengthTensor);
free(channelsTensor);
free(srcDims);
free(dstDims);
free(inputf32);
free(outputf32);
return 0;
Expand Down
8 changes: 4 additions & 4 deletions utilities/test_suite/HOST/runAudioTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
scriptPath = os.path.dirname(os.path.realpath(__file__))
inFilePath = scriptPath + "/../TEST_AUDIO_FILES/three_samples_single_channel_src1"
caseMin = 0
caseMax = 0
caseMax = 1

# Checks if the folder path is empty, or is it a root folder, or if it exists, and remove its contents
def validate_and_remove_files(path):
Expand Down Expand Up @@ -121,13 +121,13 @@ def run_performance_test(loggingFolder, srcPath, case, numRuns, testType, batchS
def rpp_test_suite_parser_and_validator():
parser = argparse.ArgumentParser()
parser.add_argument("--input_path", type = str, default = inFilePath, help = "Path to the input folder")
parser.add_argument("--case_start", type = int, default = caseMin, help = "Testing range starting case # - (0:0)")
parser.add_argument("--case_end", type = int, default = caseMax, help = "Testing range ending case # - (0:0)")
parser.add_argument("--case_start", type = int, default = caseMin, help = "Testing start case # - Range must be in [" + str(caseMin) + ":" + str(caseMax) + "]")
parser.add_argument("--case_end", type = int, default = caseMax, help = "Testing end case # - Range must be in [" + str(caseMin) + ":" + str(caseMax) + "]")
parser.add_argument('--test_type', type = int, default = 0, help = "Type of Test - (0 = QA tests / 1 = Performance tests)")
parser.add_argument('--qa_mode', type = int, default = 0, help = "Run with qa_mode? Output audio data from tests will be compared with golden outputs - (0 / 1)", required = False)
parser.add_argument('--case_list', nargs = "+", help = "List of case numbers to test", required = False)
parser.add_argument('--num_runs', type = int, default = 1, help = "Specifies the number of runs for running the performance tests")
parser.add_argument('--preserve_output', type = int, default = 1, help = "preserves the output of the program - (0 = override output / 1 = preserve output )" )
parser.add_argument('--preserve_output', type = int, default = 1, help = "preserves the output of the program - (0 = override output / 1 = preserve output )")
parser.add_argument('--batch_size', type = int, default = 1, help = "Specifies the batch size to use for running tests. Default is 1.")
args = parser.parse_args()

Expand Down
Loading