1
votes

So, Intel SDK works with intel cpu, gpu, and xeon phi. AMD SDK works with AMD gpu and cpu.

I would like to develop an application that targets intel cpu and AMD gpu. Can anyone suggest a development strategy to achieve this?

Thanks.

Edit: I would like to run both cpu and gpu kernels concurrently on the same system.

2

2 Answers

3
votes

When you get list of available platforms, in case of Intel CPU/AMD GPU you shall have 2 platforms, each with it's own ID.

Usually, that's it, you create devices an so on, using necessary platform ID in each case.

If you are using Windows, it's not so difficult to see in debugger, that different platforms corresponds to different OpenCL libraries (just go deeper into cl_platform_id structure) - both of dll's are loaded.

-2
votes

Put your OpenCL code (not necessarily the kernel) in a library and create and link the DLL files for the AMD and Intel (and NVIDIA) devices. Create a new program and dynamically load the library based on which platforms the user has installed.

Kind of a pain in the butt but it works in Labview so it should work in other languages.

If you are using Windows, you can use LoadLibrary and put the library in a folder that is in your PATH (Windows Environment Variable) or in the same folder as the .EXE.