I have installed the nvidia 331.38 driver on a laptop with a gt 650m and optimus. I followed the guide here, How can I get nVidia CUDA or OpenCL working on a laptop with nVidia discrete card/Intel Integrated Graphics? to install cuda, but cannot run the sample vector addition program provided by nvidia. The programs compile fine, but when I run them, e.g. vectorAdd, I am given
Failed to allocate device vector A (error code no CUDA-capable device is detected)!
Why is this happening?
$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 650M] (rev a1)
cudaGetDeviceCount returned 38 -> no CUDA-capable device is detected Result = FAIL