1 Reply Latest reply on Jul 30, 2014 3:46 AM by dipak

    Compiling OpenCL kernel on build server without a GPU

    jakob

      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

        • Re: Compiling OpenCL kernel on build server without a GPU
          dipak

          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,