CUDA is cross-nvidia device?

Hello, I’m beginner with the C development and with CUDA. I’m a physics course student and I was trying to run some simulations that seens to be optimized for running on a Fermi hardware. I dont have such device and when I try to run it in mine 9600GT gpu I keep getting the following error:

Cuda driver error <CUDA_ERROR_NO_BINARY_FOR_GPU>

The autor of the code gave the advice to change the -arch sm argument when compilling because the default value was set to Fermi device arch.

I searched for a doc on Nvdia CUDA site explaining these arguments about archictheture but I did not find anything.

I’m worried that my future codes will not run on any CUDA-enabled device. Is CUDA cross-nvidia device or I will have to optimize my code only for the hardware I’m working on?

Someone can clear it to me? Maybe the error in the code is for another reason. I Hope CUDA is cross-architecture nvidia device, I want anybody with a nvidia gpu be able to run my simulations

Thank You

You can run an executable compiled for on an old architecture on a new one ( the compiler is embedding ptx code that is recompiled at runtime on newer devices).
The vice versa, as you have discovered, it is not possible. The old architecture could miss features ( for example, no double precision) or have lower hardware limits
( for example, the maximum number of threads per block is 1024 for sm_2x and only 512 for sm_1x, the amount of shared memory is 48KB vs 16KB).
If there are no particular assumptions in the code on the hardware limits, you should be able to recompile the code just changing the flag from -arch sm_20 to -arch sm_11.