How to develop OpenCL code for both ATI and NVIDIA?-Collection of common programming errors

I want to write a raytracer and GPGPU seems like a very good way to accelerate it. The problem is that although OpenCL is a Khronos standard, it seems Intel, NVIDIA and ATI have all released their own SDK.

Although it seems most people around here wonder if their kernel code runs on all platforms, I’m wondering how to compile an actual C program that makes use of the OpenCL API for all platforms.

  1. Unfortunately, the only way to be sure to have no bug on all platforms is to test your kernel on all platforms ( and on all generation of GPU or CPU …), because sometimes, the NVIDIA ptx compiler crash when the AMD compiler works. And after you have to optimize your OpenCL code for each GPU and CPU architectures … Enjoy OpenCL 😉