Offline compilation for AMD and NVIDIA OpenCL Kernels without cards installed

我的未来我决定 提交于 2021-02-08 09:03:52

问题


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


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/12791527/offline-compilation-for-amd-and-nvidia-opencl-kernels-without-cards-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!