Is it possible to compile a OpenCL kernel with the help of AMD OpenCL kernel without the device being present.
I wish to test out the compiler for compilation across different kernels.
look at cl_amd_offline_devices extension
Could you please point me to some documentation with respect to that option. I checked for CL_CONTEXT_OFFLINE_DEVICES_AMD and cl_amd_offline_devices and google hardly throws up anything useful. The SDK doc (http://developer.amd.com/tools/hc/AMDAPPSDK/assets/AMD_APP_SDK_Getting_Started_Guide_v2.6.pdf) doesn't have any information.
I looked at the threads at (http://devgurus.amd.com/thread/158569 and (http://devgurus.amd.com/thread/153189. The linked mentioned on those threads to offline compilation seem to be broken.
a) "See http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=115 for more information on binary program support."
it is really simple. you just need add CL_CONTEXT_OFFLINE_DEVICES_AMD property into platform properties during context creation. after that you got virtual devices which you can then create program and retrieve binary.
Found the source of the example after some digging:http://www.findthatzip.com/search-19534973-hZIP/winrar-winzip-download-clbinary.zip.htm.
IT will be really helpful if the links could be fixed or some kind of redirection provided.
When I look at the code at the following example (hopefully it is the correct example), I see the structure of code something like this:
1) Get the platform ID' ( clGetPlatformInfo)2) Pass on these ID's to ( clCreateContextFromType)
Please correct me if I am wrong, but clGetPlatformInfo will not be able to identify AMD as one of the platforms if I do not have a AMD GPU card installed. If that is the case I would not be able to compile my kernels "offline". Am I correct?
you can isntall AMD APP SDK and it will grant you one CPU device. you just need CPU which support SSE3. also download CodeXL http://developer.amd.com/tools/hc/CodeXL/Pages/default.aspx and install KernelAnalyzer. with that tool you can compile kernels.
this is example for offline compilation http://developer.amd.com/Resources/documentation/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=115
Retrieving data ...