nvcc
compiler does not detect locally available GPUs, it always targets SM 1.0 by default. Otherwise it could introduce some quite confusing behavior when building on different systems.
To compile for the available device, you either need to ask user to specify the SM version or run some detection code during the build time. I'm convinced that it is easier to put hardware detection code into runtime and then configure your kernel launch as desired.