mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Reuse math_brute_force ulp threshold in spir test
Spir test compares floating-point kernel results bit-by-bit with correct results. However, for math_brute_force kernels, specification does not ask for SPIR and OpenCL C path to match bit-to-bit. This patch reuses ulps threshold from math_brute_force folder for math_brute_force kernels in spir test. Signed-off-by: Wenju He <wenju.he@intel.com>
This commit is contained in:
committed by
Alastair Murray
parent
b5028806d8
commit
1de46f2ca1
@@ -746,7 +746,7 @@ void run_kernel( cl_kernel kernel, cl_command_queue queue, WorkSizeInfo &ws, Tes
|
||||
/**
|
||||
Compare two test results
|
||||
*/
|
||||
bool compare_results( const TestResult& lhs, const TestResult& rhs )
|
||||
bool compare_results( const TestResult& lhs, const TestResult& rhs, float ulps )
|
||||
{
|
||||
if( lhs.kernelArgs().getArgCount() != rhs.kernelArgs().getArgCount() )
|
||||
{
|
||||
@@ -756,7 +756,7 @@ bool compare_results( const TestResult& lhs, const TestResult& rhs )
|
||||
|
||||
for( size_t i = 0 ; i < lhs.kernelArgs().getArgCount(); ++i )
|
||||
{
|
||||
if( ! lhs.kernelArgs().getArg(i)->compare( *rhs.kernelArgs().getArg(i)) )
|
||||
if( ! lhs.kernelArgs().getArg(i)->compare( *rhs.kernelArgs().getArg(i), ulps ) )
|
||||
{
|
||||
log_error("the kernel parameter (%d) is different between SPIR and CL version of the kernel\n", i);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user