Bruteforce - embedded, relaxed ulp requirements (#839)

* Add embedded profile ULP requiremnts for relaxed tests.

* Fixed exp relaxed ULP for embedded.

* Added a utility function, getAllowedUlpError, for determining FP32 ULP.

* Collection of requested changes from PR.

Re-named float_embedded_relaxed_ulps -> relaxed_embedded_error.

Re-ordered Func struct members.
This commit is contained in:
Jeremy Kemp
2020-08-10 13:19:26 +01:00
committed by GitHub
parent ce484988ab
commit 93001e99a4
8 changed files with 286 additions and 135 deletions

View File

@@ -491,9 +491,9 @@ static cl_int TestFloat(cl_uint job_id, cl_uint thread_id, void *data)
size_t buffer_size = buffer_elements * sizeof( cl_float );
cl_uint base = job_id * (cl_uint) job->step;
ThreadInfo *tinfo = job->tinfo + thread_id;
float ulps = job->ulps;
fptr func = job->f->func;
bool relaxedMode = job->relaxedMode;
float ulps = getAllowedUlpError(job->f, relaxedMode);
if (relaxedMode)
{
func = job->f->rfunc;
@@ -731,8 +731,6 @@ static cl_int TestFloat(cl_uint job_id, cl_uint thread_id, void *data)
float err = Ulp_Error( test, correct );
float errB = Ulp_Error( test, (float) correct );
if (relaxedMode) ulps = job->f->relaxed_error;
int fail = ((!(fabsf(err) <= ulps)) && (!(fabsf(errB) <= ulps)));
if( fabsf( errB ) < fabsf(err ) )
err = errB;