I am unable to run cuda samples properly. Whenever I run oceanFFT.exe it gives output as below,
CUDA error at C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\common\inc\helper_cuda.h:1133 code=38(cudaErrorNoDevice) “cudaGetDeviceCount(&device_count)”
My laptop is having optimus enabled with gpu (NVIDIA GeForce 940MX and Intel HD Graphics 640) and Windows 10. I have installed Visual Studio 2015 Community with update 3 and then installed Cuda 8.0. I am not facing any problem to build the binaries of cuda examples by using VS. Sometimes I am able to run the binaries but most of the time I fail to run it and getting above errors. Even though I have updated the gpu driver Geforce 940MX still I am getting the same error. Please help me to resolve the issue.