Problem with the Hello World Cuda Example from Developer AMD:
You can't easily write just bytes (char) and small data types from a kernel to host memory (or maybe sometimes even just memory).

You need this: #pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable to avoid this problem. On my 4870 ATI / AMD gpu it does not work (I think its related to the only supported open cl 1.0).

I used ints and later floats (so I replaced the char* with an int array) and it worked without problems even without the #pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable line.

Enable Build Log / Compile Error Log
If you don't understand why your kernel isn't working enable the build log. The init() function in this project enables it automactly. I think you can use it or copy the buildLog / getBuildInfo from it. You have to read the buid log manually from every kernel you compile I think.

I just get Error -43 / CL_INVALID_KERNEL_NAME
The open cl error codes can be found in opencl-directory/cl/cl.h. You can use the getErrorDesc from the source, which translates the error code the defined error names.

If you enable the build log you will noticed about bugs in your kernels (my mistake was to type global int* int instead of global int* in). It compiled on cpu but not on the gpu. Sometimes big arrays crash on the cpu, but not on the gpu.

Type clinfo for information about max sizes and supported functions / memory of your hardware. Enable the build log (see above).

Wrong Open CL Version
This OpenCL build requires version 1.4.879, version 1.4.635 installed, was the error message.
I solved this problem but downloading the latest driver directly from the AMD website, removed the installed driver via the Ubuntu driver panel. Then restarted my pc, made the downloaded driver executeable and started it. After installation I had to restart the pc again, then everything worked.

More Informations Home

Last edited May 6, 2012 at 12:55 AM by rohezal, version 7


No comments yet.