1

I was trying to figure out a way to perform offline compilation of OpenCL kernels without installing Graphics cards. I have installed the SDK's.

Does anyone has any experience with compiling OpenCL Kernels without having the graphics cards installed for both any one of them NVIDIA or AMD.

I had asked a similar question on AMD forums 
(http://devgurus.amd.com/message/1284379). 
NVIDIA forums for long are in accessible so couldn't get any help from there. 

Thanks

Ryan Wheale
  • 26,022
  • 8
  • 76
  • 96
gudge
  • 1,053
  • 4
  • 18
  • 33

2 Answers2

4

AMD has an OpenCL extension for compiling binaries for devices that are not present on the system. The extension is called cl_amd_offline_devices. Pass the property CL_CONTEXT_OFFLINE_DEVICES_AMD when creating a context and all of AMDs supported devices are reported and can be used to create binaries as if they were present on the system.

Check out their OpenCL programming guide at http://developer.amd.com/tools/hc/AMDAPPSDK/assets/AMD_Accelerated_Parallel_Processing_OpenCL_Programming_Guide.pdf for more info

Erik Smistad
  • 1,009
  • 8
  • 7
-1

No need to graphic card, you can compile OpenCL programs for CPU too. If you have Intel or AMD CPU this idea works. Download latest OpenCL SDK from corresponding manufacturer website and compile OpenCL program: Intel OpenCL SDK AMD APP

lashgar
  • 5,184
  • 3
  • 37
  • 45
  • But compilation time for CPU and GPU may not be the same right. It depends on implementation. I want to specifically figure out the compilation time to generate code for GPU. – gudge Oct 09 '12 at 17:24
  • As far as know, OpenCL has two compilation phases. First phase includes OpenCL kernel into the program binary at compile time. At second phase, the kernel is compiled just at the runtime for the ocl device. Do you want to measure the duration of second phase? – lashgar Oct 09 '12 at 17:50
  • I wish to have data for second phase but for that I would need the device. – gudge Oct 09 '12 at 19:09
  • I am not sure but you may find the [GPGPU-sim](http://www.gpgpu-sim.org/) exactly what you want. – lashgar Oct 09 '12 at 19:16