How To Define Architecture in Makefile


I’ve a T1060 card running CUDA v3.2 on a Linux machine. The SDK examples work until I tried to change the calculation from float to double by using the sm_13 architecture. I added “NVCCFLAGS += -arch=compute_13,code=sm_13” to the Makefile and it didn’t work. What should I add to the Makefile in order for compiling in double precision? Thanks in advance!

The Makefiles already contain a -gencode compiler flag which seems to take precedence if both are specified. Set GENCODE_ARCH to the -gencode flag you want for your code.

EDIT: And don’t use the Makefiles from the SDK for your own code by the way.