OpenCL on CPU and GPU with Nvidia cards on Ubuntu 10.10 ?


I have a bi Xeon machine with Ubuntu 10.10 and a Nvidia GTX 480 graphic card on it and I’d like to use OpenCL on the CPU and the GPU.

I installed the latest Nvidia driver (nvidia-current) with apt-get and I downloaded and installed the latest CUDA Toolkit (3.2) from the Nvidia page.

BUT this allows me only to run OpenCL code on the Nvidia GPU and NOT on the CPU.

I then read some articles on the internet saying that the ATI SDK is able to run OpenCL code on the CPU.

I installed the latest version of ATI drivers then tried to compile the SDK.

I was then able to run code on the CPU but not on the GPU anymore.

Is there any way to run OpenCL code both on the Nvidia GPU and the Xeon CPU ?

In OpenCL there is a “platform layer” API that allows you to enumerate the different platforms installed on your machine and choose between them (see clGetPlatformIDs in the spec). This is implemented by providing an ICD DLL that you link to that redirects your calls to the particular vendor platform implementation that you have selected while you run. Both nVidia and AMD have provided ICD-compatiable implementations for Windows and Linux, I believe.

I’m afraid I don’t have any additional details, but hopefully this provides you with enough information to find detailed documentation.