mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
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:
@@ -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"(
|
||||
|
||||
@@ -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[] =
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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[] =
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -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[] =
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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[] =
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user