cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

alariq
Adept I

gDEBugger: OpenCL buffer is unavailable

Hi, All

I am trying to debug my OpenCL code. I am using AMD gDEBugger 6.2 Catalyst 12.8 . I have HD7800 graphics adapter.

The program is very simple, i just create some buffers then set them as parameters to the kernel. and run kernel.

But at any point i cannot see contents of my buffers.

Here is how i create buffers:

cl_mem buf = clCreateBuffer(context, CL_MEM_READ_ONLY|CL_MEM_HOST_WRITE_ONLY, size, 0, &status);

status = clEnqueueWrite(queue, buf, TRUE, size, pdata, 0,0,0);

then i set it up like this:

status = clSetKernelArg(my_kernel, 0, sizeof(cl_mem), (void*)&buf);

check_status;

and execute my kernel:

const size_t gws[2] = { 16, 16};

cl_event eventND[1];

clEnqueueNDRangeKernel(queue, my_kern, 2, NULL, (const size_t*)gws, 0,0,0, eventND);

check_status;

then i wait for event:

while(st!=CL_COMPLETE)

{

status = clGetEventInfo(..., &st, NULL);

check_status;

}

part of my kernel :

__kernel void my_kern(

__global CHUNK_DATA* pcd,

__constant int* buf  // c++ example was shown for this buffer, but pcd is created in same way

//.. other __constant buffers (total about 16, max available for my adapter is 8 but i assume, driver merges some of them, so there are no errors)

)

{

...

}

I've checked, there are no CL errors. I tried to run on bot GPU and CPU and have same problem.

Any thoughts on where can be a problem?

Thanks

check_status;
Detect language » English
HeHelHHjdehjkfhewkjfhewjkfhwejkhfwejhwefjkhwejkfhej
0 Likes
0 Replies