cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

panphone
Journeyman III

How are work items assigned to the graphics card and CPU?

if I set the context is CL_DEVICE_TYPE_ALL,how are work items assigned to the graphics card and CPU? Equally, or other?

0 Likes
4 Replies
nou
Exemplar

when you set CL_DEVICE_TYPE_ALL you get context with two or more devices. CPU and GPU's. but you still enqueue task into individual device queue so you must implement load balancing on your own.

0 Likes

nou,thank you

I ignored the Device parameter of the function clCreateCommandQueue.

Because we do not know the performance of client‘s CPU and GPU ?it is  difficult to implement load balancing.Do you have any good idea?

0 Likes

measure time which take to execute enqueued task and change workload accordingly.compute some sort of performance index.

but IMHO combining CPU and GPU is not so good idea. because most application will need CPU to prepare data.

0 Likes

The advantage of combining the two is that you can let the run time manage the interaction rather than yourself doing work. You could prepare the work in a CL task on the host and use an event to trigger GPU work. Letting the runtime manage this should allow some extra overlapping that waiting for the queue to finish on the host would not allow.

It may not work now, but that's the theory, anyway.

0 Likes