Refactor wimpy feature (#2507)

- Make it a common parameter in harness using either '-w', '--wimpy' or
'CL_WIMPY_MODE' environment variable.
- Remove all test specific wimpy variable.

---------

Co-authored-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
Romaric Jodin
2025-09-02 18:47:44 +02:00
committed by GitHub
parent 096a227afd
commit 8e125bd2e8
27 changed files with 52 additions and 86 deletions

View File

@@ -16,6 +16,7 @@
#include "harness/compat.h"
#include "harness/kernelHelpers.h"
#include "harness/testHarness.h"
#include "harness/parseParameters.h"
#include <string.h>

View File

@@ -58,7 +58,6 @@ uint32_t gDeviceFrequency = 0;
uint32_t gComputeDevices = 0;
size_t gMaxThreadGroupSize = 0;
size_t gWorkGroupSize = 0;
bool gWimpyMode = false;
int gWimpyReductionFactor = 512;
int gTestDouble = 0;
bool gHostReset = false;

View File

@@ -74,7 +74,6 @@ extern bool gHostReset;
// gWimpyMode indicates if we run the test in wimpy mode where we limit the
// size of 32 bit ranges to a much smaller set. This is meant to be used
// as a smoke test
extern bool gWimpyMode;
extern int gWimpyReductionFactor;
uint64_t ReadTime( void );

View File

@@ -178,9 +178,6 @@ static int ParseArgs( int argc, const char **argv )
case 'r': gHostReset = true; break;
case 'w': // Wimpy mode
gWimpyMode = true;
break;
case '[':
parseWimpyReductionFactor( arg, gWimpyReductionFactor);
break;
@@ -199,12 +196,6 @@ static int ParseArgs( int argc, const char **argv )
}
}
if (getenv("CL_WIMPY_MODE")) {
vlog( "\n" );
vlog( "*** Detected CL_WIMPY_MODE env ***\n" );
gWimpyMode = 1;
}
PrintArch();
if( gWimpyMode )
{
@@ -234,7 +225,6 @@ static void PrintUsage( void )
"supported)\n");
vlog("\t\t-t\tToggle reporting performance data.\n");
vlog("\t\t-r\tReset buffers on host instead of on device.\n");
vlog("\t\t-w\tRun in wimpy mode\n");
vlog("\t\t-[2^n]\tSet wimpy reduction factor, recommended range of n is "
"1-12, default factor(%u)\n",
gWimpyReductionFactor);