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

@@ -17,6 +17,7 @@
#include <string.h>
#include "harness/testHarness.h"
#include "harness/typeWrappers.h"
#include "harness/parseParameters.h"
#include <vector>
@@ -25,7 +26,6 @@
#ifdef CL_VERSION_2_0
extern int gWimpyMode;
// clang-format off
static const char* enqueue_simple_block[] = { R"(

View File

@@ -17,6 +17,7 @@
#include <string.h>
#include "harness/testHarness.h"
#include "harness/typeWrappers.h"
#include "harness/parseParameters.h"
#include <vector>
@@ -25,7 +26,6 @@
#ifdef CL_VERSION_2_0
extern int gWimpyMode;
#define BITS_DEPTH 28
static const char* enqueue_flags_wait_kernel_simple[] =

View File

@@ -17,6 +17,7 @@
#include <string.h>
#include "harness/testHarness.h"
#include "harness/typeWrappers.h"
#include "harness/parseParameters.h"
#include <vector>
@@ -24,10 +25,7 @@
#include <time.h>
#ifdef CL_VERSION_2_0
extern int gWimpyMode;
static const char enqueue_block_multi_queue[] =
NL "#define BLOCK_COMPLETED 0"
NL "#define BLOCK_SUBMITTED 1"

View File

@@ -17,6 +17,7 @@
#include <string.h>
#include "harness/testHarness.h"
#include "harness/typeWrappers.h"
#include "harness/parseParameters.h"
#include <algorithm>
#include <vector>
@@ -26,7 +27,6 @@
#ifdef CL_VERSION_2_0
extern int gWimpyMode;
static const char *helper_ndrange_1d_glo[] = {
NL,
"void block_fn(int len, __global atomic_uint* val)" NL,

View File

@@ -17,6 +17,7 @@
#include <string.h>
#include "harness/testHarness.h"
#include "harness/typeWrappers.h"
#include "harness/parseParameters.h"
#include <vector>
@@ -25,7 +26,6 @@
#ifdef CL_VERSION_2_0
extern int gWimpyMode;
static int nestingLevel = 3;
static const char* enqueue_1D_wg_size_single[] =

View File

@@ -17,6 +17,7 @@
#include <string.h>
#include "harness/testHarness.h"
#include "harness/typeWrappers.h"
#include "harness/parseParameters.h"
#include <vector>
@@ -25,7 +26,6 @@
#ifdef CL_VERSION_2_0
extern int gWimpyMode;
static const char* multi_queue_simple_block1[] =
{
NL, "void block_fn(size_t tid, int mul, __global int* res)"

View File

@@ -17,6 +17,7 @@
#include <string.h>
#include "harness/testHarness.h"
#include "harness/typeWrappers.h"
#include "harness/parseParameters.h"
#include <algorithm>
#include <vector>
@@ -24,8 +25,6 @@
#include "utils.h"
#include <time.h>
extern int gWimpyMode;
#ifdef CL_VERSION_2_0
static const char* enqueue_block_first_kernel[] =

View File

@@ -25,7 +25,6 @@
#include "utils.h"
std::string gKernelName;
int gWimpyMode = 0;
test_status InitCL(cl_device_id device) {
auto version = get_device_cl_version(device);
@@ -71,11 +70,6 @@ int main(int argc, const char *argv[])
gKernelName = std::string(argv[i + 1]);
argsRemoveNum += 2;
}
if (strcmp(argv[i], "-w") == 0 ){
gWimpyMode = 1;
argsRemoveNum += 1;
}
if (argsRemoveNum > 0) {
for (int j = i; j < (argc - argsRemoveNum); ++j)

View File

@@ -17,6 +17,7 @@
#include <string.h>
#include "harness/testHarness.h"
#include "harness/typeWrappers.h"
#include "harness/parseParameters.h"
#include <vector>
@@ -27,7 +28,6 @@
#ifdef CL_VERSION_2_0
static int gNestingLevel = 4;
extern int gWimpyMode;
static const char* enqueue_nested_blocks_single[] =
{