RAJA icon indicating copy to clipboard operation
RAJA copied to clipboard

Add a test that exercises long double in a way that would break storage/alignment if not handled correctly by the compiler

Open CRobeck opened this issue 2 years ago • 0 comments

Currently sizeof(long double) returns different values in the AMDGPU backend depending if called from the CPU or GPU. This could cause storage/alignment issues if not handled correctly. Add a test that uses something like the following:

struct Point{   
    long double x;    
    float y;    
    float z;
 }

that is set on the host (where long double is supported) and then passed to the device where is it not. Where a shift in alignment caused by conflicting storage requirements by the CPU and GPU will cause data corruption.

CRobeck avatar Feb 14 '23 19:02 CRobeck