Changing to compute_50,sm_50 can nvcc.exe -dlink to fail

CUDA 8.0 + VS2012 SP1 + Intel VF2013 on 64 Win7

We upgrade to CUDA 8 (from CUDA 7) and try to remove the message “obsolete compute_20 and sm_20”. Our solution did not set the architecture. I am trying to specify 30, 40 and 50 and I have experienced few issues. Here is one (others are on different topics).

  1. if I specify let’s say compute_50,sm_50, the link failed with the message below (reported by VS). Q1: why is the link failing (works on Win32 Release)?

error MSB3721: The command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe” -dlink -o x64\Release\cvfac.device-link.obj -Xcompiler “/EHsc /W3 /nologo /O2 /Zi /MD " -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64” -LE:\MDE\Release\ cudart_static.lib cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib E:\MDE\x64\Release\ambi.lib -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_20,code=sm_20 --machine 64 x64\Release\ x64\Release\” exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\CUDA 8.0.targets 773 9 cvfac

-gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_20,code=sm_20

This looks like a duplicate specification. You’re going to need to change the way you’re setting your compiler options. If you’re in Visual Studio, there’s a section where you can change the compute capability directly.