Failed to set up CUDA 8.0 for Windows 10 with Geforce 940MX GPU

I could not find neither nvidia-smi.exe file nor C:\Program Files\NVIDIA Corporation\NVSMI folder in my lenovo thinkpad E470 laptop with windows 10 OS, NVIDIA Geforce 940MX GPU.

I have installed

  1. Visual Studio Community 2015 with Update 3
  2. CUDA 8.0

nvcc --version output is
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Mon_Jan__9_17:32:33_CST_2017
Cuda compilation tools, release 8.0, V8.0.60

gcc --version output is
gcc.exe (GCC) 4.7.0 20111220 (experimental)

when I run deviceQuery.exe, I am getting output as below

CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 38
→ no CUDA-capable device is detected
Result = FAIL

whenever I want to import keras, I get warning as below
“WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be removed in the next release (v0.10). Please switch to the gpuarray backend. You can get more information about how to switch at this URL:
Converting to the new gpu back end(gpuarray) · Theano/Theano Wiki · GitHub
WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available (error: Unable to get the number of gpus available: no CUDA-capable device is detected)
Using Theano backend.”

Sometimes gpu works and sometimes does not work after some minutes(installing cuda again and running oceanfft.exe). I am getting frustrated for the cuda set up properly. Please help me to resolve the issue.

you’ll need to investigate how to get your laptop GPU to be available all the time. Search on Optimus laptop cuda.

Can you please suggest me the procedure to install cuda 8.0 with VS2015 in my optimus laptop. I have tried a lot to figure out where is the problem, but unable to resolve it. Please help me to figure out it. I am a newbie for GPU and CUDA.