cudaSetDevice failed! Do you have a CUDA-capable GPU installed?addWithCuda failed!

Hi I’m a newbie to Cuda programming. I followed various tutorials and setup the Cuda project in visual basics 2019 (OS: Windows 10). I created a project from the template Cuda 11.0 runtime. The build was successful. But when run the program it throws an error

“cudaSetDevice failed! Do you have a CUDA-capable GPU installed?addWithCuda failed!”

I have dell XPS laptop with Nvidia Geforce GTX 1650

The output of nvidia-smi:

C:\Windows\System32>nvidia-smi
Thu Jun 11 20:26:38 2020
±----------------------------------------------------------------------------+
| NVIDIA-SMI 441.45 Driver Version: 441.45 CUDA Version: 10.2 |
|-------------------------------±---------------------±---------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1650 WDDM | 00000000:01:00.0 Off | N/A |
| N/A 46C P8 5W / N/A | 132MiB / 4096MiB | 0% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
±----------------------------------------------------------------------------+