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

@@ -66,7 +66,6 @@ int gSkipCorrectnessTesting = 0;
static int gStopOnError = 0;
static bool gSkipRestOfTests;
int gForceFTZ = 0;
int gWimpyMode = 0;
int gHostFill = 0;
static int gHasDouble = 0;
static int gTestFloat = 1;
@@ -502,10 +501,6 @@ static int ParseArgs(int argc, const char **argv)
case 'v': gVerboseBruteForce ^= 1; break;
case 'w': // wimpy mode
gWimpyMode ^= 1;
break;
case '[':
parseWimpyReductionFactor(arg, gWimpyReductionFactor);
break;
@@ -585,14 +580,6 @@ static int ParseArgs(int argc, const char **argv)
}
}
// Check for the wimpy mode environment variable
if (getenv("CL_WIMPY_MODE"))
{
vlog("\n");
vlog("*** Detected CL_WIMPY_MODE env ***\n");
gWimpyMode = 1;
}
PrintArch();
if (gWimpyMode)
@@ -647,7 +634,6 @@ static void PrintUsage(void)
"accuracy checks.)\n");
vlog("\t\t-m\tToggle run multi-threaded. (Default: on) )\n");
vlog("\t\t-s\tStop on error\n");
vlog("\t\t-w\tToggle Wimpy Mode, * Not a valid test * \n");
vlog("\t\t-[2^n]\tSet wimpy reduction factor, recommended range of n is "
"1-10, default factor(%u)\n",
gWimpyReductionFactor);

View File

@@ -23,6 +23,7 @@
#include "harness/testHarness.h"
#include "harness/ThreadPool.h"
#include "harness/conversions.h"
#include "harness/parseParameters.h"
#include "CL/cl_half.h"
#define BUFFER_SIZE (1024 * 1024 * 2)
@@ -60,7 +61,6 @@ extern cl_mem gOutBuffer2[VECTOR_SIZE_COUNT];
extern int gSkipCorrectnessTesting;
extern int gForceFTZ;
extern int gFastRelaxedDerived;
extern int gWimpyMode;
extern int gHostFill;
extern int gIsInRTZMode;
extern int gHasHalf;