Cuda程序运行时出现:invalid device function错误信息时,有可能是编译选项 -arch 选择错误,与显卡支持的版本号不一致,具体显卡支持的版本号可到nVidia官网查看: http://www.nvidia.com/content/cuda/cuda-gpus.html