mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix floating point validation in write_image tests (#1017)
Fix validate_float/half_write_results so that when nan/inf is encountered on a channel, the rest of the channel values are still considered for correctness. Signed-off-by: John Kesapides <john.kesapides@arm.com> Signed-off-by: James Morrissey <james.morrissey@arm.com> Co-authored-by: John Kesapides <john.kesapides@arm.com>
This commit is contained in:
committed by
GitHub
parent
a6809710ea
commit
0a8c5feed7
@@ -1174,8 +1174,11 @@ bool validate_float_write_results( float *expected, float *actual, image_descrip
|
||||
continue;
|
||||
if ( IsFloatSubnormal( expected[j] ) && actual[j] == 0.0f )
|
||||
continue;
|
||||
pass = false;
|
||||
break;
|
||||
if (expected[j] != actual[j])
|
||||
{
|
||||
pass = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return pass;
|
||||
@@ -1193,8 +1196,11 @@ bool validate_half_write_results( cl_half *expected, cl_half *actual, image_desc
|
||||
continue;
|
||||
if ( is_half_denorm( expected[j] ) && is_half_zero( actual[j] ) )
|
||||
continue;
|
||||
pass = false;
|
||||
break;
|
||||
if (expected[j] != actual[j])
|
||||
{
|
||||
pass = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return pass;
|
||||
|
||||
Reference in New Issue
Block a user