AnsweredAssumed Answered

Possible OpenCL kernel (CPU) compiler bug

Question asked by Deluxe on Mar 9, 2013
Latest reply on Mar 14, 2013 by himanshu.gautam

I have following (quite simple) function my kernel code. Problem is that this function compiles without any problems on GPU (RV770), but on CPU (AMD FX-8350) call to clBuildProgram causes "access violation exception" in amdocl.dll.

 

float4 RandNormalFloat4(float4 mi, float2 sigma, mwc64xvec4_state_t *s)
{
    float4 out;
    float4 randSeed = RandFloat4((float4)(0.0f), (float4)(1.0f), s);

    // TODO: Try to use "native_" versions
    out = (sigma * sqrt((float2)(-2.0f) * log((float2)(1.0f) - randSeed.xz))).xxyy;
    out.xz = out.xz * sincos(2.0f*M_PI_F * randSeed.yw, &out.yw);    
    return out + mi;
}

 

Problem seems to be call of "sincos" function, if I replace this line with following separate calls of "sin" and "cos" kernel compiles without problems on both GPU and CPU devices.

 

out.xz = out.xz * sin(2.0f * M_PI_F * randSeed.yw);
out.yw = out.xz * cos(2.0f * M_PI_F * randSeed.yw);

 

I'm using Catalyst 13.1 legacy driver (OpenCL 1.0 AMD-APP 937.2) and AMD-APP 2.8 (tried 2.6 RC3 and 2.7 RC too). Actually AMD-APP 2.7 and AMD APP CPU Runtime from AMD-APP 2.8.

"clinfo.exe"output is in attachment.

Attachments

Outcomes