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
Asked
Active
Viewed 1,592 times
8
-
Does *any* vendor support SPIR yet? The spec has been finalized only a month ago. – Feb 26 '14 at 20:48
-
actually i don't know which vendor supports SPIR currently. So is there any intermediate language(like PTX) which is used by radeon devices? – grypp Feb 26 '14 at 21:26
-
2It's unlikely to happen any time soon, too. nVidia has been trying hard to provide the worst possible OpenCL support for years (e.g. categorically not implementing `ARB_cl_event` and `cl_khr_gl_event`, which makes OpenCL useless for 80-90% of its applications, regardless of version). Of course they'd like if you used CUDA instead. – Damon Jan 08 '15 at 12:41
1 Answers
4
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.

Erik Duymelinck
- 701
- 6
- 8