PDA

View Full Version : Limits/recommandations for number of contexts/queues?



janjan
06-30-2009, 12:42 PM
When I understand the OpenCl specs correctly, it is possible to:

- assign one card to several devices
- create more than one command queue for a given device/context combination

Is there an official minimum number of devices/queues which can be created for a single device/context?

Not that I want to create dozens of contexts on a single device, but it would be helpful to get some recommendation (Although I guess this heavily depends on the type of the device).

janjan
06-30-2009, 03:42 PM
sorry, it should be

- assign one card to several contexts

dbs2
07-21-2009, 01:14 PM
The details will depend on the vendor implementation, but in general you should assume that both contexts and queues take up resources, so you should not create too many of them. Contexts should be used for grouping devices that need to share data, and queues should be used for submitting work to devices. In general, queues should be cheaper than contexts, but it all depends on the implementation.