A Kernel that run in CPU and GPU same time

Hi,

Someone have a reference that can indicate or a code example for make a kernel that run in CPU and GPU same time?

I think that it is more for a host code than a kernel code.

Very thanks,

The AMD APP SDK contains a few examples of multi-GPU code. The main change you would have to make is to query multiple platforms for CPUs and GPUs. I am not aware of any examples that specifically show how to do what you want to do (I haven’t really looked, just jumped in and did it my way).

What I find works for multi-GPU code running on AMD and Nvidia GPUs simultaneously is to create a separate context for each device in each platform. You have to allocate buffers on each device and handle splitting the work between the devices by yourself. I also make a copy my kernel for each device. The approach to CPU+GPU programming would be the same. Note that you will have to optimise your kernels for each different device.

Thank you,

With your response, I think I know what to do.