mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
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:
@@ -233,6 +233,7 @@ typedef struct TestInfo
|
||||
cl_kernel *k[VECTOR_SIZE_COUNT ]; // arrays of thread-specific kernels for each worker thread: k[vector_size][thread_id]
|
||||
ThreadInfo *tinfo; // An array of thread specific information for each worker thread
|
||||
cl_uint threadCount; // Number of worker threads
|
||||
cl_uint jobCount; // Number of jobs
|
||||
cl_uint step; // step between each chunk and the next.
|
||||
cl_uint scale; // stride between individual test values
|
||||
float ulps; // max_allowed ulps
|
||||
@@ -268,6 +269,16 @@ int TestFunc_Float_Float_Float_common(const Func *f, MTdata d, int isNextafter)
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ulps = gIsEmbedded ? f->float_embedded_ulps : f->float_ulps;
|
||||
test_info.ftz = f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gFloatCapabilities);
|
||||
@@ -341,7 +352,7 @@ int TestFunc_Float_Float_Float_common(const Func *f, MTdata d, int isNextafter)
|
||||
// Run the kernels
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestFloat, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestFloat, test_info.jobCount, &test_info );
|
||||
|
||||
// Accumulate the arithmetic errors
|
||||
for( i = 0; i < test_info.threadCount; i++ )
|
||||
@@ -991,6 +1002,16 @@ int TestFunc_Double_Double_Double_common(const Func *f, MTdata d, int isNextafte
|
||||
test_info.scale = (cl_uint) sizeof(cl_double) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ulps = f->double_ulps;
|
||||
test_info.ftz = f->ftz || gForceFTZ;
|
||||
@@ -1063,7 +1084,7 @@ int TestFunc_Double_Double_Double_common(const Func *f, MTdata d, int isNextafte
|
||||
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestDouble, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestDouble, test_info.jobCount, &test_info );
|
||||
|
||||
// Accumulate the arithmetic errors
|
||||
for( i = 0; i < test_info.threadCount; i++ )
|
||||
|
||||
@@ -207,6 +207,7 @@ typedef struct TestInfo
|
||||
cl_kernel *k[VECTOR_SIZE_COUNT ]; // arrays of thread-specific kernels for each worker thread: k[vector_size][thread_id]
|
||||
ThreadInfo *tinfo; // An array of thread specific information for each worker thread
|
||||
cl_uint threadCount; // Number of worker threads
|
||||
cl_uint jobCount; // Number of jobs
|
||||
cl_uint step; // step between each chunk and the next.
|
||||
cl_uint scale; // stride between individual test values
|
||||
float ulps; // max_allowed ulps
|
||||
@@ -260,6 +261,16 @@ int TestFunc_Float_Float_Float_Operator(const Func *f, MTdata d)
|
||||
}
|
||||
|
||||
test_info.step = test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ulps = gIsEmbedded ? f->float_embedded_ulps : f->float_ulps;
|
||||
test_info.ftz = f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gFloatCapabilities);
|
||||
@@ -329,7 +340,7 @@ int TestFunc_Float_Float_Float_Operator(const Func *f, MTdata d)
|
||||
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestFloat, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestFloat, test_info.jobCount, &test_info );
|
||||
|
||||
// Accumulate the arithmetic errors
|
||||
for( i = 0; i < test_info.threadCount; i++ )
|
||||
@@ -501,63 +512,51 @@ static cl_int TestFloat( cl_uint job_id, cl_uint thread_id, void *data )
|
||||
int totalSpecialValueCount = specialValuesFloatCount * specialValuesFloatCount;
|
||||
int indx = (totalSpecialValueCount - 1) / buffer_elements;
|
||||
|
||||
if( job_id <= (cl_uint)indx )
|
||||
{ // test edge cases
|
||||
float *fp = (float *)p;
|
||||
float *fp2 = (float *)p2;
|
||||
|
||||
if( job_id <= (cl_uint)indx ) {
|
||||
// Insert special values
|
||||
uint32_t x, y;
|
||||
|
||||
x = (job_id * buffer_elements) % specialValuesFloatCount;
|
||||
y = (job_id * buffer_elements) / specialValuesFloatCount;
|
||||
x = (job_id * buffer_elements) % specialValuesFloatCount;
|
||||
y = (job_id * buffer_elements) / specialValuesFloatCount;
|
||||
|
||||
for( ; j < buffer_elements; j++ )
|
||||
{
|
||||
fp[j] = specialValuesFloat[x];
|
||||
fp2[j] = specialValuesFloat[y];
|
||||
if( ++x >= specialValuesFloatCount )
|
||||
{
|
||||
for( ; j < buffer_elements; j++ ) {
|
||||
p[j] = ((cl_uint *)specialValuesFloat)[x];
|
||||
p2[j] = ((cl_uint *)specialValuesFloat)[y];
|
||||
++x;
|
||||
if (x >= specialValuesFloatCount) {
|
||||
x = 0;
|
||||
y++;
|
||||
if( y >= specialValuesFloatCount )
|
||||
if (y >= specialValuesFloatCount)
|
||||
break;
|
||||
}
|
||||
if(gTestFastRelaxed && strcmp(name,"divide") == 0 )
|
||||
{
|
||||
float fpj = *(float*)&fp[j];
|
||||
float fpj2 = *(float*)&fp2[j];
|
||||
if(fabs(fpj) > 0x5E800000 ) //[2^-62,2^62]
|
||||
{
|
||||
fp[j] = NAN;
|
||||
}
|
||||
if( fabs(fpj2) > 0x5E800000 ) //[2^-62,2^62]
|
||||
{
|
||||
fp2[j] = NAN;
|
||||
}
|
||||
if (gTestFastRelaxed && strcmp(name,"divide") == 0) {
|
||||
cl_uint pj = p[j] & 0x7fffffff;
|
||||
cl_uint p2j = p2[j] & 0x7fffffff;
|
||||
// Replace values outside [2^-62, 2^62] with QNaN
|
||||
if (pj < 0x20800000 || pj > 0x5e800000)
|
||||
p[j] = 0x7fc00000;
|
||||
if (p2j < 0x20800000 || p2j > 0x5e800000)
|
||||
p2[j] = 0x7fc00000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Init any remaining values.
|
||||
// Init any remaining values.
|
||||
for( ; j < buffer_elements; j++ )
|
||||
{
|
||||
p[j] = genrand_int32(d);
|
||||
p2[j] = genrand_int32(d);
|
||||
|
||||
if(gTestFastRelaxed)
|
||||
{
|
||||
if( strcmp(name,"divide")==0){
|
||||
float pj = *(float*)&p[j];
|
||||
float pj2 = *(float*)&p2[j];
|
||||
if(fabs(pj) > 0x5E800000 ) //[2^-62,2^62]
|
||||
{
|
||||
p[j] = NAN;
|
||||
}
|
||||
if( fabs(pj2) > 0x5E800000 ) //[2^-62,2^62]
|
||||
{
|
||||
p2[j] = NAN;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gTestFastRelaxed && strcmp(name,"divide") == 0) {
|
||||
cl_uint pj = p[j] & 0x7fffffff;
|
||||
cl_uint p2j = p2[j] & 0x7fffffff;
|
||||
// Replace values outside [2^-62, 2^62] with QNaN
|
||||
if (pj < 0x20800000 || pj > 0x5e800000)
|
||||
p[j] = 0x7fc00000;
|
||||
if (p2j < 0x20800000 || p2j > 0x5e800000)
|
||||
p2[j] = 0x7fc00000;
|
||||
}
|
||||
}
|
||||
|
||||
if( (error = clEnqueueWriteBuffer( tinfo->tQueue, tinfo->inBuf, CL_FALSE, 0, buffer_size, p, 0, NULL, NULL) ))
|
||||
@@ -950,6 +949,16 @@ int TestFunc_Double_Double_Double_Operator(const Func *f, MTdata d)
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ulps = f->double_ulps;
|
||||
test_info.ftz = f->ftz || gForceFTZ;
|
||||
@@ -1020,7 +1029,7 @@ int TestFunc_Double_Double_Double_Operator(const Func *f, MTdata d)
|
||||
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestDouble, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestDouble, test_info.jobCount, &test_info );
|
||||
|
||||
// Accumulate the arithmetic errors
|
||||
for( i = 0; i < test_info.threadCount; i++ )
|
||||
|
||||
@@ -230,6 +230,7 @@ typedef struct TestInfo
|
||||
cl_kernel *k[VECTOR_SIZE_COUNT ]; // arrays of thread-specific kernels for each worker thread: k[vector_size][thread_id]
|
||||
ThreadInfo *tinfo; // An array of thread specific information for each worker thread
|
||||
cl_uint threadCount; // Number of worker threads
|
||||
cl_uint jobCount; // Number of jobs
|
||||
cl_uint step; // step between each chunk and the next.
|
||||
cl_uint scale; // stride between individual test values
|
||||
float ulps; // max_allowed ulps
|
||||
@@ -262,6 +263,16 @@ int TestFunc_Float_Float_Int(const Func *f, MTdata d)
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ulps = gIsEmbedded ? f->float_embedded_ulps : f->float_ulps;
|
||||
test_info.ftz = f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gFloatCapabilities);
|
||||
@@ -330,7 +341,7 @@ int TestFunc_Float_Float_Int(const Func *f, MTdata d)
|
||||
}
|
||||
|
||||
// Run the kernels
|
||||
error = ThreadPool_Do( TestFloat, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestFloat, test_info.jobCount, &test_info );
|
||||
|
||||
|
||||
// Accumulate the arithmetic errors
|
||||
@@ -758,6 +769,16 @@ int TestFunc_Double_Double_Int(const Func *f, MTdata d)
|
||||
test_info.scale = (cl_uint) sizeof(cl_double) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ulps = f->double_ulps;
|
||||
test_info.ftz = f->ftz || gForceFTZ;
|
||||
@@ -831,7 +852,7 @@ int TestFunc_Double_Double_Int(const Func *f, MTdata d)
|
||||
|
||||
// Run the kernels
|
||||
if( !gSkipCorrectnessTesting )
|
||||
error = ThreadPool_Do( TestDouble, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestDouble, test_info.jobCount, &test_info );
|
||||
|
||||
|
||||
// Accumulate the arithmetic errors
|
||||
|
||||
@@ -222,6 +222,7 @@ typedef struct TestInfo
|
||||
cl_kernel *k[VECTOR_SIZE_COUNT ]; // arrays of thread-specific kernels for each worker thread: k[vector_size][thread_id]
|
||||
ThreadInfo *tinfo; // An array of thread specific information for each worker thread
|
||||
cl_uint threadCount; // Number of worker threads
|
||||
cl_uint jobCount; // Number of jobs
|
||||
cl_uint step; // step between each chunk and the next.
|
||||
cl_uint scale; // stride between individual test values
|
||||
int ftz; // non-zero if running in flush to zero mode
|
||||
@@ -249,6 +250,16 @@ int TestMacro_Int_Float_Float(const Func *f, MTdata d)
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ftz = f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gFloatCapabilities);
|
||||
|
||||
@@ -319,7 +330,7 @@ int TestMacro_Int_Float_Float(const Func *f, MTdata d)
|
||||
// Run the kernels
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestFloat, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestFloat, test_info.jobCount, &test_info );
|
||||
|
||||
if( error )
|
||||
goto exit;
|
||||
@@ -749,6 +760,16 @@ int TestMacro_Int_Double_Double(const Func *f, MTdata d)
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ftz = f->ftz || gForceFTZ;
|
||||
|
||||
@@ -820,7 +841,7 @@ int TestMacro_Int_Double_Double(const Func *f, MTdata d)
|
||||
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestDouble, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestDouble, test_info.jobCount, &test_info );
|
||||
|
||||
if( error )
|
||||
goto exit;
|
||||
|
||||
@@ -193,6 +193,7 @@ typedef struct TestInfo
|
||||
cl_kernel *k[VECTOR_SIZE_COUNT ]; // arrays of thread-specific kernels for each worker thread: k[vector_size][thread_id]
|
||||
ThreadInfo *tinfo; // An array of thread specific information for each worker thread
|
||||
cl_uint threadCount; // Number of worker threads
|
||||
cl_uint jobCount; // Number of jobs
|
||||
cl_uint step; // step between each chunk and the next.
|
||||
cl_uint scale; // stride between individual test values
|
||||
int ftz; // non-zero if running in flush to zero mode
|
||||
@@ -220,6 +221,16 @@ int TestMacro_Int_Float(const Func *f, MTdata d)
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ftz = f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gFloatCapabilities);
|
||||
// cl_kernels aren't thread safe, so we make one for each vector size for every thread
|
||||
@@ -279,7 +290,7 @@ int TestMacro_Int_Float(const Func *f, MTdata d)
|
||||
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestFloat, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestFloat, test_info.jobCount, &test_info );
|
||||
|
||||
if( error )
|
||||
goto exit;
|
||||
@@ -602,6 +613,16 @@ int TestMacro_Int_Double(const Func *f, MTdata d)
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ftz = f->ftz || gForceFTZ;
|
||||
|
||||
@@ -664,7 +685,7 @@ int TestMacro_Int_Double(const Func *f, MTdata d)
|
||||
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestDouble, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestDouble, test_info.jobCount, &test_info );
|
||||
|
||||
if( error )
|
||||
goto exit;
|
||||
|
||||
@@ -699,6 +699,8 @@ static void PrintArch( void )
|
||||
vlog( "\tARCH:\tx86_64\n" );
|
||||
#elif defined( __arm__ )
|
||||
vlog( "\tARCH:\tarm\n" );
|
||||
#elif defined( __aarch64__ )
|
||||
vlog( "\tARCH:\taarch64\n" );
|
||||
#else
|
||||
vlog( "\tARCH:\tunknown\n" );
|
||||
#endif
|
||||
|
||||
@@ -1790,7 +1790,7 @@ static const double //two52 = 4.50359962737049600000e+15, /* 0x43300000, 0x00000
|
||||
// *signgamp = 1;
|
||||
ix = hx&0x7fffffff;
|
||||
if(ix>=0x7ff00000) return x*x;
|
||||
if((ix|lx)==0) return (double)(one)/(double)(zero);
|
||||
if((ix|lx)==0) return INFINITY;
|
||||
if(ix<0x3b900000) { /* |x|<2**-70, return -log(|x|) */
|
||||
if(hx<0) {
|
||||
// *signgamp = -1;
|
||||
@@ -1799,9 +1799,9 @@ static const double //two52 = 4.50359962737049600000e+15, /* 0x43300000, 0x00000
|
||||
}
|
||||
if(hx<0) {
|
||||
if(ix>=0x43300000) /* |x|>=2**52, must be -integer */
|
||||
return (double)(one)/(double)(zero);
|
||||
return INFINITY;
|
||||
t = reference_sinpi(x);
|
||||
if(t==zero) (double)(one)/(double)(zero); /* -integer */
|
||||
if(t==zero) return INFINITY; /* -integer */
|
||||
nadj = reference_log(pi/reference_fabs(t*x));
|
||||
// if(t<zero) *signgamp = -1;
|
||||
x = -x;
|
||||
|
||||
0
test_conformance/math_brute_force/run_math_brute_force_in_parallel.py
Normal file → Executable file
0
test_conformance/math_brute_force/run_math_brute_force_in_parallel.py
Normal file → Executable file
@@ -200,6 +200,7 @@ typedef struct TestInfo
|
||||
cl_kernel *k[VECTOR_SIZE_COUNT ]; // arrays of thread-specific kernels for each worker thread: k[vector_size][thread_id]
|
||||
ThreadInfo *tinfo; // An array of thread specific information for each worker thread
|
||||
cl_uint threadCount; // Number of worker threads
|
||||
cl_uint jobCount; // Number of jobs
|
||||
cl_uint step; // step between each chunk and the next.
|
||||
cl_uint scale; // stride between individual test values
|
||||
float ulps; // max_allowed ulps
|
||||
@@ -234,6 +235,16 @@ int TestFunc_Float_Float(const Func *f, MTdata d)
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ulps = gIsEmbedded ? f->float_embedded_ulps : f->float_ulps;
|
||||
test_info.ftz = f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gFloatCapabilities);
|
||||
@@ -309,7 +320,7 @@ int TestFunc_Float_Float(const Func *f, MTdata d)
|
||||
|
||||
if( !gSkipCorrectnessTesting || skipTestingRelaxed)
|
||||
{
|
||||
error = ThreadPool_Do( TestFloat, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestFloat, test_info.jobCount, &test_info );
|
||||
|
||||
// Accumulate the arithmetic errors
|
||||
for( i = 0; i < test_info.threadCount; i++ )
|
||||
@@ -997,7 +1008,16 @@ int TestFunc_Double_Double(const Func *f, MTdata d)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_double) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_double) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
//there was overflow
|
||||
test_info.jobCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
test_info.jobCount = (cl_uint)((1ULL << 32) / test_info.step);
|
||||
}
|
||||
|
||||
test_info.f = f;
|
||||
test_info.ulps = f->double_ulps;
|
||||
@@ -1062,7 +1082,7 @@ int TestFunc_Double_Double(const Func *f, MTdata d)
|
||||
|
||||
if( !gSkipCorrectnessTesting )
|
||||
{
|
||||
error = ThreadPool_Do( TestDouble, (cl_uint) ((1ULL<<32) / test_info.step), &test_info );
|
||||
error = ThreadPool_Do( TestDouble, test_info.jobCount, &test_info );
|
||||
|
||||
// Accumulate the arithmetic errors
|
||||
for( i = 0; i < test_info.threadCount; i++ )
|
||||
|
||||
Reference in New Issue
Block a user