Need to install opencl for CPU and GPU boards?

I have a system with an NVidia graphics card and am looking at using openCL to replace openMP for small CPU tasks (thanks to VS2010 making openMP useless )

Since I have the NVidia opencl SDK installed, clGetPlatformIDs () only returns one platform (NVidia) and therefore only one device (GPU).

Do I also need to install Intel openCL sdk to access the processor platform?
Should the CPU platform always be available - I mean how you don't have a CPU?
How do you manage to build two openCL SDKs at the same time?

+3


source to share


2 answers


You need an SDK that provides an interface to the CPU. nVidia does not support AMD or Intel SDK; in my case one from Intel is significantly (something like 10x) faster, which may be due to poor programming on my side.

You don't need an SDK to run programs just at runtime. On Linux, each vendor installs a file in /etc/OpenCL/vendors/*.icd

that contains the path to the runtime library to use. This is scanned in the OpenCL environment you referenced (libOpenCL.so), which then calls each of the vendor's vendors when requesting devices on that particular platform.



On Linux, GPU drivers set the OpenCL startup time automatically, the Intel runtime will probably be loaded separately from the SDK, but is of course part of the SDK.

+8


source


Today I finally got around to trying to start developing openCl and wow ... it's not that easy.

There is AMD sdk, there is intel sdk, there is nvidia sdk, each with its own properties (only CPU vs GPU only vs support for a specific video card?)

There may be valid technical reasons why it should be this way, but I really want there to be only one sdk, and that when programming, perhaps you could specify GPU / CPU tasks, or perhaps it would use any resources preformed best or SOMETHING.



Time to dive in, though I'm guessing ... trying to decide if I'll go CPU or GPU. I have a fairly new $ 4000 laptop with SLI graphics cards, but then also an 8-cpu, so yeah ... guess you need to try a couple of sdk's and see which preforms work best for my needs?

Not sure what end users of my apps will do, though ... they can't seem to flip the switch to make it run on cpu or gpu.

The OpenCL album really needs some help ...

-1


source







All Articles