Does NVidia support OpenCL SPIR?

眉间皱痕 提交于 2019-12-30 08:27:17

问题


I am wondering that whether nvidia supports spir backend or not? if yes, i couldn't find any document and sample example about that. but if not, is there a any way to work spir backend onto nvidia gpus? thanks in advance


回答1:


Since SPIR builds on top of OpenCL version 1.2, and so far Nvidia has not made any OpenCL 1.2 drivers available, it is not possible to use SPIR with Nvidia GPUs. As mentioned in the comments, Nvidia has made PTX available as intermediate language (also based on LLVM IR). One could consider translating SPIR into PTX but I don't know how realistic that would be.

Other vendors such as AMD and Intel are already showing support for SPIR. This can be verified by querying the CL_DEVICE_EXTENSIONS with the clGetDeviceInfo OpenCL API. If the result string contains cl_khr_spir, the driver supports SPIR.



来源:https://stackoverflow.com/questions/22052832/does-nvidia-support-opencl-spir

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