cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Tasp
Journeyman III

CL_CONTEXT_OFFLINE_DEVICES_AMD and different sources per device

Hi,

in my sources I change:

__kernel __attribute__((reqd_work_group_size(x, y, 1)))

accodring to device capabilities.

How can I do that with CL_CONTEXT_OFFLINE_DEVICES_AMD enabled?

As in http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=115 :

You compile one source and get multiple binaries.

+ I want to compile kernels only for specific devices, not for every possible device!

 

0 Likes
2 Replies
nou
Exemplar

CL_CONTEXT_OFFLINE_DEVICES_AMD and different sources per device

see second and third parameter of clBuildProgram()

0 Likes
Tasp
Journeyman III

CL_CONTEXT_OFFLINE_DEVICES_AMD and different sources per device

Ok I think I got it.

The solution is to pick out the device you want and create a new context with it. Then do all steps with this context.

0 Likes