I use a CUDA-enabled device with compute capability 3.0. In MATLAB I can test this and it shows that double precision is supported, as expected. But when I compile code with nvcc, it warns that my device only supports float, not double. I was thinking perhaps it’s compiling for my Intel onboard GPU instead of my NVIDIA card. Is this possible? Is there a way I can test this using nvcc?
nvcc does not determine the compilation target based on the GPU in the system you are compiling on. You need to specify which platform(s) code should be generated for using command line switches -arch, -code, and -gencode. See chapter 6 of the NVCC documentation. In the absence of a specified GPU architecture target, nvcc defaults to the lowest supported GPU architecture, leading to the observed lack of double-precision support.