_Big_Mac_

Different device types in a single context

Discussion created by _Big_Mac_ on Feb 1, 2010
Latest reply on Feb 5, 2010 by gaurav.garg
Why is this a bad idea?

In Dominik Bohr's slides here http://gpgpu.org/wp/wp-content/uploads/2009/09/C1-OpenCL-API.pdf on page 6 we read

"You may mix different device types in a context. Not
necessarily a good idea though."

Why is this not necessarily a good idea? Why not have one context per platform that encompasses all device types?  Is this something specific to AMD's implementation at the time of writing or is it something more general that's likely to apply to all OpenCL implementations?

If we have a CPU and a GPU plus a single buffer and we want to process it on both devices for some reason, is it better to have both devices in a common context and let OpenCL replicate the buffer or should we have two contexts and manually sync and copy data?

Outcomes