Content *) HOW TO INSTALL OPENCL (AMD Radeon HD + Linux) *) IN THIS DIRECTORY AND ON THE WEB *) OTHER MATERIAL =========================================================================== HOW TO INSTALL OPENCL (AMD Radeon HD + Linux) You may ask for an account on my own server, where OpenCL is already installed. Otherwise, installing the OpenCL library and includes is a matter of minutes. I've tried with the one that comes along with AMD APP (formerly ATI Stream): http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx Follow the "downloads" link on the leftmost vertical column (ignore all the links in the upper horizontal bar). If you have an OpenCL-capable AMD/ATI videocard chipset (I've a humble Radeon HD 5450), you might also want to install the AMD proprietary driver; follow the same "downloads" link as above. This way, the card can be detected as an OpenCL device of type GPU. Otherwise I think the host CPU will be the only detected OpenCL device, of type CPU of course (not GPU). First, install the graphic proprietary driver. Then, configure X to work with that driver (no "framebuffer"). Last, install the remainder of the SDK including OpenCL. Use the utility "clinfo" for detecting all the OpenCL-capable devices in your platform. You should be detected a device of type CPU, at least, plus a a device of type GPU. THE X SERVER MUST BE ACTIVE: if you want your videocard to be detected as an OpenCL device, it is --mandatory-- that the X server is active and switched to the video output (so the screen looks in "graphic mode"). If X is off, the GPU is not detected. If X is on, but you switch to a testual VT console, the "clinfo" (as well as any other OpenCL program) will hang on GPU detection. USING THE GPU FROM REMOTE is possible, but again, the X server of the GPU host must be active and switched to video output. Look out for any firewall settings on the GPU host, that might prevent X connections from establishing in localhost. If the user who needs to use the GPU is different from the user who owns the running X process, then the owner of X has to invoke the "xhost" command for granting access privileges, and the user has to invoke "DISPLAY=:0.0 && export DISPLAY" for getting connected to the X process. This is not necessary if the remote user is the same as the owner of the running X process. The SDK provides C bindings (include CL/cl.h), and C++ bindings (include CL/cl.hpp). An experimental Java binding can be found at http://www.jocl.org/ =========================================================================== IN THIS DIRECTORY AND ON THE WEB OpenCL_tutorial.pdf introductory slides, some minor mistakes, good as the very first doc to read OpenCL_intro.pdf more detailed introductory slides, interesting considerations about performance on different hardware platforms Introduction_to_OpenCL_Programming_Training_Guide.pdf Introduction_to_OpenCL_Programming_Exercises/ a good tutorial (except the "installing" section, that is outdated) OpenCL-1-1-quick-reference-card.pdf the name is self-explaining http://www.it.uu.se/katalog/davbl791/presentations/Introduction%20to%20OpenCL.pdf a more extensive step-by-step tutorial http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/ online man pages (OpenCL 1.1) http://www.khronos.org/opencl/ a comprehensive site Aaftab Munshi, Benedict R. Gaster, Timothy G. Mattson, James Fung, Dan Ginsburg "OpenCL Programming Guide", Addison-Wesley, 2012 a book ;-) ask around for a copy... =========================================================================== OTHER MATERIAL other/AMD_OpenCL_Tutorial_SAAHPC2010.pdf for those who like the pics; complete, but not the right choice for a novice IMHO; worth a look other/OpenCL_Best_Practices_Guide.pdf performance evaluation and optimization hints; not for novices, yet quite easy to follow other/OpenCL_Programming_Guide.pdf more specific for the CUDA implementation of OpenCL, but the introduction is worth a look; matrix multiplication example; some guidelines for program optimization; low-level details related to nVidia gpus http://opencl.codeplex.com/wikipage?title=OpenCL Tutorials - 1 http://www.codeproject.com/KB/showcase/Portable-Parallelism.aspx http://www.codeproject.com/KB/showcase/Memory-Spaces.aspx http://www.codeproject.com/KB/showcase/Work-Groups-Sync.aspx