I want to be able to run my software in GPU mode on NVidia and in CPU (sofware) mode on ATI or Intel. How can I achieve this?
It\'s the same like PhysX works.
C
There are now initiatives to run CUDA on non-NVidia hardware such as by Otoy : http://venturebeat.com/2016/03/09/otoy-breakthrough-lets-game-developers-run-the-best-graphics-software-across-platforms/
Essentially it translates CUDA calls to other backends (Metal, Vilkan, DirectX, OpenGL) to allow applications written for CUDA to run on a range of platforms. It's not known whether it will be possible to simply put their nvcuda.dll in the right location and thereby instantly get your app working, or if the developer would have to change something before deploying the software.
So far there is no public release afaik.
converting this to an answer:
there's a software called GPU Ocelot that will figure out what hardware to run the gpu code on at runtime: http://code.google.com/p/gpuocelot/
run all your calls through Ocelot and you should be good to go.
From the homepage:
Ocelot is a modular dynamic compilation framework for heterogeneous system, providing various backend targets for CUDA programs and analysis modules for the PTX virtual instruction set. Ocelot currently allows CUDA programs to be executed on NVIDIA GPUs, AMD GPUs, and x86-CPUs at full speed without recompilation.