Synchronise with Khronos-private Gitlab branch

The maintenance of the conformance tests is moving to Github.

This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
Kevin Petit
2019-02-20 16:10:04 +00:00
committed by Kévin Petit
parent b1603eb6ba
commit 53db6e7f9f
115 changed files with 2632 additions and 1304 deletions

View File

@@ -19,6 +19,7 @@ set (${MODULE_NAME}_SOURCES
../../test_common/harness/errorHelpers.c
../../test_common/harness/kernelHelpers.c
../../test_common/harness/testHarness.c
../../test_common/harness/parseParameters.cpp
)
if(ANDROID)

View File

@@ -751,16 +751,11 @@ static void ulong2uint( void *out, void *in){ ((cl_uint*) out)[0] = (cl_uint) ((
static void ulong2int( void *out, void *in){ ((cl_int*) out)[0] = (cl_int) ((cl_ulong*) in)[0]; }
static void ulong2float( void *out, void *in)
{
#if defined(_MSC_VER)
#if defined(_MSC_VER) && defined(_M_X64)
cl_ulong l = ((cl_ulong*) in)[0];
float result;
cl_long sl = ((cl_long)l < 0) ? (cl_long)((l >> 1) | (l & 1)) : (cl_long)l;
#if defined(_M_X64)
_mm_store_ss(&result, _mm_cvtsi64_ss(_mm_setzero_ps(), sl));
#else
result = sl;
#endif
((float*) out)[0] = (l == 0 ? 0.0f : (((cl_long)l < 0) ? result * 2.0f : result));
#else
cl_ulong l = ((cl_ulong*) in)[0];

View File

@@ -18,6 +18,7 @@
#include "../../test_common/harness/ThreadPool.h"
#include "../../test_common/harness/testHarness.h"
#include "../../test_common/harness/kernelHelpers.h"
#include "../../test_common/harness/parseParameters.h"
#if !defined(_WIN32) && !defined(__ANDROID__)
#include <sys/sysctl.h>
#endif
@@ -98,6 +99,7 @@ cl_mem gOutBuffers[ kCallStyleCount ];
size_t gComputeDevices = 0;
uint32_t gDeviceFrequency = 0;
int gWimpyMode = 0;
int gWimpyReductionFactor = 128;
int gSkipTesting = 0;
int gForceFTZ = 0;
int gMultithread = 1;
@@ -438,6 +440,9 @@ static int ParseArgs( int argc, const char **argv )
case 'w':
gWimpyMode ^= 1;
break;
case '[':
parseWimpyReductionFactor(arg, gWimpyReductionFactor);
break;
case 'z':
gForceFTZ ^= 1;
break;
@@ -540,6 +545,7 @@ static int ParseArgs( int argc, const char **argv )
vlog( "*** WARNING: Testing in Wimpy mode! ***\n" );
vlog( "*** Wimpy mode is not sufficient to verify correctness. ***\n" );
vlog( "*** It gives warm fuzzy feelings and then nevers calls. ***\n\n" );
vlog("*** Wimpy Reduction Factor: %-27u ***\n\n", gWimpyReductionFactor);
}
return 0;
@@ -566,6 +572,7 @@ static void PrintUsage( void )
vlog( "\t\t-l\tToggle link check mode. When on, testing is skipped, and we just check to see that the kernels build. (Off by default.)\n" );
vlog( "\t\t-m\tToggle Multithreading. (On by default.)\n" );
vlog( "\t\t-w\tToggle wimpy mode. When wimpy mode is on, we run a very small subset of the tests for each fn. NOT A VALID TEST! (Off by default.)\n" );
vlog(" \t\t-[2^n]\tSet wimpy reduction factor, recommended range of n is 1-12, default factor(%u)\n", gWimpyReductionFactor);
vlog( "\t\t-z\tToggle flush to zero mode (Default: per device)\n" );
vlog( "\t\t-#\tTest just vector size given by #, where # is an element of the set {1,2,3,4,8,16}\n" );
vlog( "\n" );
@@ -1243,15 +1250,12 @@ static int DoTest( Type outType, Type inType, SaturationMode sat, RoundingMode r
if ( !gWimpyMode && gIsEmbedded )
step = blockCount * EMBEDDED_REDUCTION_FACTOR;
if ( gWimpyMode )
step = (size_t)blockCount * (size_t)gWimpyReductionFactor;
vlog( "Testing... " );
fflush(stdout);
for( i = 0; i < (uint64_t)lastCase; i += step )
{
if (gWimpyMode) {
uint64_t blockIndex = (i / blockCount) & 0xFF;
if (blockIndex != 0 && blockIndex != 0xFF)
continue;
}
if( 0 == ( i & ((lastCase >> 3) -1))) {
vlog(".");