Question

Could someone tell if it's possible to get an OpenCL code working with both AMD and Nvidia cards after compilation and what is the general procedure for that? Do I need to get both OpenCL SDKs (AMD/Nvidia) installed and with an "if" structure make different code for each cases (AMD device or Nvidia device)? If you could just clarify a bit with some headlines would appreciate it. Thanks.

Was it helpful?

Solution

Yes it is possible, this is the purpose of OpenCL over CUDA (which only works with NVIDIA hardware). Basically you make your code writing kernels in C99 which one will then be compiled in an intermediate "manufacturer independent" code. That last code will then be interpreted by your card (AMD or Nvidia) during the runtime. Normally, there is no reason why you should write different card specific code neither use different SDK (but well… I'm on Max OS 10.7 which possibly differs from other environment)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top