Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

compiler warning: Double is not supported. Demoting to float

Tags:

cuda

I'm getting the following message:

Double is not supported. Demoting to float

I added the following command to the compiler : -arch=sm_20 but im still getting that message.
im using sdk 4 with Nvida G105M.

What does this message mean?

like image 637
igal k Avatar asked Dec 16 '22 04:12

igal k


2 Answers

The G105M is only compute capability 1.1 and so lacks any double precision floating point capability. You need a device with at least compute capability 1.3 if you really do need double precision, and even then it's generally not a good idea, as it tends to be a major performance killer on all but some of the newer, high end GPUs.

like image 153
Paul R Avatar answered May 18 '23 19:05

Paul R


From your comment that you are using "sdk 4" I infer you are trying to compile an SDK sample. The SDK makefile already contains a variety of -arch or -gencode command line settings for nvcc, so even if you add -arch=sm_20, there are probably other options on the command line that are causing the compiler to generate pre-sm_13 code, which is probably why it is warning.

like image 42
harrism Avatar answered May 18 '23 19:05

harrism