When I was compiling cuda code by using makefile, there awalys have a nvcc warning

My setup for cuda
cuda 8.0+linux ubuntu 16.04+NVIDIA GEFORCE GTX850M

When I was compiling cuda code by using makefile, there awalys have a nvcc warning as folowed

nvcc warning : The ‘compute_20’, ‘sm_20’, and ‘sm_21’ architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).

How could fix this problem? I will be very grateful,if anyone can help me !

compile with the correct architecture for the GPU you are using.

For example

-arch=sm_50

for a GTX850M

http://blog.csdn.net/u010454261/article/details/53943788 或许有用。

Thank you !!

Thank you !!

But what am I supposed to do to change the architecture for the GPU I am using?

Pleas tell me some specific steps,thank you !

You can run the deviceQuery application found in the cuda samples. If you are running linux this can be found in the /usr/local/cuda/samples/1_Utilities/deviceQuery/ directory. This will produce the output I have pasted below - the architecture is the one I have highlighted in bold (therefore I would compile with the flags '-arch=sm_61`

Device 1: “GeForce GTX 1050 Ti”
CUDA Driver Version / Runtime Version 8.0 / 8.0
CUDA Capability Major/Minor version number: 6.1
Total amount of global memory: 4038 MBytes (4234608640 bytes)
( 6) Multiprocessors, (128) CUDA Cores/MP: 768 CUDA Cores
GPU Max Clock rate: 1392 MHz (1.39 GHz)
Memory Clock rate: 3504 Mhz

Thank you! But what I really want to know is that which profile should put the code(like ‘arch=sm_61’) into ?