genn-team / genn

GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia CUDA.
http://genn-team.github.io/
GNU Lesser General Public License v2.1
231 stars 57 forks source link

Multiple -x in Windows CUDA build #188

Closed neworderofjamie closed 6 years ago

neworderofjamie commented 6 years ago

On Visual Studio 2017 (Community) with CUDA 9.1, the extra -x inserted in the additional build settings of the MSbuild script causes the build to fail as the CUDA plugin already adds one.

  1. Is the extra -x actually necessary with CUDA 7.5/8?
  2. If so, is it the newer Visual Studio or the newer CUDA version that causes the issue?
neworderofjamie commented 6 years ago

The extra -x is necessary with:

The extra -x is not necessary with:

neworderofjamie commented 6 years ago
  C:\sussex\genn_examples\va_benchmark>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\bin\nvcc.exe" -gencode=arch=compute_61,code=\"sm_61,compute_61\
  " --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64" -x cu  -Ic:\sussex\genn\lib\include -Ic:\sussex\genn\userproject\
  include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include" -Ic:\sussex\genn\lib\include -Ic:\sussex\genn\userproject\include -I"C:\Program F
  iles\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include" -IC:\sussex\GeNN_Robotics\common -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include"   -
  lineinfo  --keep-dir obj\X64\Release -maxrregcount=0  --machine 64 --compile -cudart static -x cu     -Xcompiler "/EHsc /W1 /nologo /O2 /FS /Zi  /MT " -o obj
  \X64\Release\runner.cc.obj "C:\sussex\genn_examples\va_benchmark\va_benchmark_CODE\runner.cc"
  nvcc fatal   : redefinition of argument 'x'
neworderofjamie commented 6 years ago

190 fixes this issue