AnsweredAssumed Answered

Stack overflow in clBuildProgram on Catalyst 14.12 with R9 290

Question asked by timchist on Dec 15, 2014
Latest reply on Jul 16, 2015 by dipak

When I try to compile certain OpenCL code on a machine with R9 290 installed running a Catalyst 14.12 driver, the program crashes with stack overflow in amdocl64.dll when calling clBuildProgram.

The same code compiles just fine on a machine running HD 7970 with the same driver.

 

Below is the minimum kernel causing this to happen:

 

__kernel void test(__global float* srcBase, __global  float* dstBase, int width,  int height)

{

    int x = get_global_id(0);

    if(x < width)

    {

        int y = get_global_id(1);

        if(y < height)

        {

            __global float* dst        = dstBase + x + y * width;

            __global const float* head = srcBase     + y * width;

            int offsetLeft   = x > 0? -1: 0;

            float leftFactor = x > 0? 1: 0;

            float curAverage = leftFactor * (head[offsetLeft]);

            *dst = curAverage;

            dst += width;

        }

    }

}

Outcomes