nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated

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).

I am working with cusp and cusparse libraries for SpMV kernel. i am using p4 and k80 gpu. In both devices it is giving this warning with cuda-8 and cuda-9 while compiling my code with both the libraries.
I am compiling with:
nvcc -shared -Xcompiler -fPIC -o spmv_cusp.so cusp_dll_final.cu -I “cusplibrary”
nvcc -shared -std=c++11 mmio.c -Xcompiler -fPIC -o spmv_cusparse.so cusparse_dll_final.cpp -l cusparse

Does this warning affect performance? can i ignore it or i need to do something more.

If you do a bit of google searching you will find various writeups. You can get this warning from CUDA-8 but not CUDA-9. The default architecture (if no compile switches are set for architecture) is to compile for compute_20/sm_20, and compute_20 architecture is deprecated as of CUDA-8 (and support for it was dropped in CUDA-9, so the default architecture for CUDA-9 is compute_30/sm_30).

How you compile your code can certainly affect performance.

Its generally recommended that you compile your code with architecture(s) that match the GPU(s) you are running on.

The nvcc manual has full descriptions and examples:

[url]https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html[/url]

You can find out the architecture of your GPU using deviceQuery.

When focusing only on CUDA libraries, e.g. cusparse, the architecture setting should not matter for the library code. With cusp, this is a header-only library, so architecture settings may affect performance.