mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 22:19:02 +00:00
Restored the embedded reduction factor to bruteforce.
This change was present on the GitLab branch but missed out during the transition to GitHub. This change is intentionally as close as possible to the patch on GitLab. Fixes #1045
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "harness/conversions.h"
|
||||
|
||||
#define BUFFER_SIZE (1024*1024*2)
|
||||
#define EMBEDDED_REDUCTION_FACTOR (64)
|
||||
|
||||
#if defined( __GNUC__ )
|
||||
#define UNUSED __attribute__ ((unused))
|
||||
|
||||
@@ -283,6 +283,11 @@ int TestFunc_Float_Float_Float_common(const Func *f, MTdata d, int isNextafter,
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_float) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
@@ -1021,6 +1026,11 @@ int TestFunc_Double_Double_Double_common(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;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
|
||||
@@ -274,6 +274,10 @@ int TestFunc_Float_Float_Float_Operator(const Func *f, MTdata d,
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_float) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
@@ -969,6 +973,10 @@ int TestFunc_Double_Double_Double_Operator(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;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
|
||||
@@ -272,6 +272,11 @@ int TestFunc_Float_Float_Int(const Func *f, MTdata d, bool relaxedMode)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_float) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
@@ -786,6 +791,11 @@ int TestFunc_Double_Double_Int(const Func *f, MTdata d, bool relaxedMode)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_double) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_double) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
|
||||
@@ -297,6 +297,10 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
if(gWimpyMode ){
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(float)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
if( gIsEmbedded )
|
||||
float_ulps = f->float_embedded_ulps;
|
||||
@@ -722,6 +726,10 @@ int TestFunc_DoubleI_Double_Double(const Func *f, MTdata d, bool relaxedMode)
|
||||
if(gWimpyMode ){
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(double)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
#if defined PARALLEL_REFERENCE
|
||||
cl_uint threadCount = GetThreadCount();
|
||||
|
||||
@@ -199,6 +199,10 @@ int TestFunc_Int_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(cl_float)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
// This test is not using ThreadPool so we need to disable FTZ here
|
||||
// for reference computations
|
||||
@@ -420,6 +424,11 @@ int TestFunc_Int_Double(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(cl_double)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
// This test is not using ThreadPool so we need to disable FTZ here
|
||||
// for reference computations
|
||||
FPU_mode_type oldMode;
|
||||
|
||||
@@ -259,6 +259,11 @@ int TestMacro_Int_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_float) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
@@ -771,6 +776,10 @@ int TestMacro_Int_Double_Double(const Func *f, MTdata d, bool relaxedMode)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_double) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_double) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
|
||||
@@ -230,6 +230,11 @@ int TestMacro_Int_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_float) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
@@ -629,6 +634,10 @@ int TestMacro_Int_Double(const Func *f, MTdata d, bool relaxedMode)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_double) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_double) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
|
||||
@@ -213,6 +213,11 @@ int TestFunc_mad(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(float)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
// Init the kernels
|
||||
BuildKernelInfo build_info = { gMinVectorSizeIndex, kernels, programs,
|
||||
f->nameInCode, relaxedMode };
|
||||
@@ -680,6 +685,11 @@ int TestFunc_mad_Double(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(double)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
// Init the kernels
|
||||
BuildKernelInfo build_info = { gMinVectorSizeIndex, kernels, programs,
|
||||
f->nameInCode, relaxedMode };
|
||||
|
||||
@@ -238,6 +238,10 @@ int TestFunc_Float_Float_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(float)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
if( gIsEmbedded )
|
||||
float_ulps = f->float_embedded_ulps;
|
||||
@@ -879,6 +883,10 @@ int TestFunc_Double_Double_Double_Double(const Func *f, MTdata d,
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(double)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
Force64BitFPUPrecision();
|
||||
|
||||
|
||||
@@ -246,6 +246,11 @@ int TestFunc_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_float) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_float) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
@@ -1033,6 +1038,11 @@ int TestFunc_Double_Double(const Func *f, MTdata d, bool relaxedMode)
|
||||
test_info.subBufferSize = gWimpyBufferSize / (sizeof( cl_double) * RoundUpToNextPowerOfTwo(test_info.threadCount));
|
||||
test_info.scale = (cl_uint) sizeof(cl_double) * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
test_info.scale *= EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
test_info.step = (cl_uint) test_info.subBufferSize * test_info.scale;
|
||||
if (test_info.step / test_info.subBufferSize != test_info.scale)
|
||||
{
|
||||
|
||||
@@ -215,6 +215,10 @@ int TestFunc_Float2_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(float)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
// Init the kernels
|
||||
BuildKernelInfo build_info = { gMinVectorSizeIndex, kernels, programs,
|
||||
@@ -674,6 +678,10 @@ int TestFunc_Double2_Double(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(double)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
Force64BitFPUPrecision();
|
||||
|
||||
|
||||
@@ -218,6 +218,11 @@ int TestFunc_FloatI_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(float)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
if( gIsEmbedded )
|
||||
float_ulps = f->float_embedded_ulps;
|
||||
else
|
||||
@@ -521,6 +526,10 @@ int TestFunc_DoubleI_Double(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(double)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
Force64BitFPUPrecision();
|
||||
|
||||
|
||||
@@ -207,6 +207,11 @@ int TestFunc_Float_UInt(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(float)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
if( gIsEmbedded)
|
||||
float_ulps = f->float_embedded_ulps;
|
||||
else
|
||||
@@ -480,6 +485,11 @@ int TestFunc_Double_ULong(const Func *f, MTdata d, bool relaxedMode)
|
||||
{
|
||||
step = (1ULL<<32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
step = (BUFFER_SIZE / sizeof(double)) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
|
||||
Force64BitFPUPrecision();
|
||||
|
||||
// Init the kernels
|
||||
|
||||
Reference in New Issue
Block a user