cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

jakob
Journeyman III

Compiling OpenCL kernel on build server without a GPU

Is there a way to compile OpenCL kernels for a specific GPU (Pitcairn) on a computer without a GPU installed?

We would like to compile the OpenCL kernels on our build server. It is virtual and doesn't have a GPU installed.

I have succeeded in compiling the OpenCL kernels with CodeXL on a computer without a GPU, and after exporting the binaries I was able to execute them on another computer with a GPU. This would suggest that it is possible to compile to a specific device without it being present. But how?

I have been looking at KB115 but as far as I understand I need the device, I wish to compile for, installed on the system. The guide says: "you must find the appropriate platform.", how do I do that? I only have CPU devices on the computer, when there are no GPU installed.

--

Jakob

0 Likes
1 Reply
dipak
Big Boss

Hi Jakob,

The selected platform should be a valid AMD OpenCL platform present in your system. You should use CL_CONTEXT_OFFLINE_DEVICES_AMD in the context properties when creating the context. If this context is used while compiling, it will generate binaries for all supported devices, online/offline. Please refer the APP SDK utility function “generateBinaryImage” in file CLUtil.hpp [under folder AMD APP SDK\2.9\include\SDKUtil] to see how this can be done.

Regards,

0 Likes