HSA-Libraries / Bolt

Bolt is a C++ template library optimized for GPUs. Bolt provides high-performance library implementations for common algorithms such as scan, reduce, transform, and sort.
Other
373 stars 65 forks source link

Bolt_1.3:Windows:- Scan family test cases fails for OpenCL CPU path. #225

Open jhkumar opened 9 years ago

jhkumar commented 9 years ago

Observed test case failures for bolt cl scan families like exclusive_scan, inclusive_scan, transform_exclusive_scan, transform_inclusive_scan only for the OpenCL CPU path. For other paths like Gpu, Automatic, MultiCoreCpu, and Serial Cpu same test cases are passing.

EXAMPLE: TEST (sanity_exclusive_scan_stdVectVsDeviceVectWithIters, floatSameValuesSerialRange){

int size = 1000;
TAKE_THIS_CONTROL_PATH
bolt::cl::device_vector< float > boltInput( size, 1.125f );
bolt::cl::device_vector< float >::iterator boltEnd = bolt::cl::exclusive_scan( my_ctl, boltInput.begin( ), boltInput.end( ), boltInput.begin( ), 2.0f);

std::vector< float > stdInput( size, 1.125f);
std::vector< float >::iterator stdEnd  =    bolt::cl::exclusive_scan( stdInput.begin( ), stdInput.end( ), stdInput.begin( ), 2.0f );

EXPECT_FLOAT_EQ((*(boltEnd-1)), (*(stdEnd-1)))<<std::endl;

}