cudaGetDeviceCount returned 38

I installed cuda 7.0.
cd /NVIDIA_CUDA-7.0_Samples

There was a problem.

But final step, I tried

cd bin/x86_64/linux/release

I obtained an error.

cudaGetDeviceCount returned 38
→ no CUDA-capable device is detected
Result = FAIL

What is problem?

Well, do you have a CUDA-compatible graphics card in your computer? :-)

Have you installed the Nvidia graphics driver and blacklisted the Nouveau driver? Have you rebooted since installing the driver? Check with

lsmod | grep nvidia

and check the Nvidia driver gets listed.