I've been trying to build an OpenCL application with pyopencl, but lately I've been hitting a segfault when I call program.build(), which is a wrapper for clBuildProgram(). Oddly, the problem only happens when I run my CL code on my 270X GPU. When I create a context on my 1090T CPU, the OpenCL program runs fine. Additionally, other OpenCL programs were running just fine on my GPU. This led me to believe that the segfault must be code dependent, and I proceeded to comment out my kernels one at a time to discover which kernels were causing problems. The only three kernels that failed were each referencing and dereferencing pointers to an array (for style and clarity). Here's an example:
//Expected Grid Size: num_inputs x num_outputs x 1
__kernel void nn_update_mat_trans_finish(
__global nn_desc* net,
__global nn_desc* delta_net,
__global data_t* mat_trans_gradient,
__global data_t* mat_trans
uint it_in = get_global_id(0);
uint it_out = get_global_id(1);
data_t* w = &mat_trans[net->num_inputs * it_out + it_in];
data_t* dw = &mat_trans_gradient[delta_net->num_inputs * it_out + it_in];
*w += *dw;
Unfortunately, it appears that the dereference operator is broken on somewhere in my GPU's OpenCL stack. The code also fails to build when I try something along the lines of
data_t* w = mat_trans + net->num_inputs * it_out + it_in;
When I comment out the "*w += *dw;" line, then the code builds fine on my GPU.
My question is, where would be the proper place for an OpenCL newbie like myself to submit a bug report about this issue? I'm not sure if the fault lies in FGLRX (A proprietary linux graphics driver), or somewhere else in the OpenCL stack.