Visual Studio Project File Adjustments with 10.1 Update

I finally got around to updating to CUDA v10.1 and it was fairly painless. I had to make two adjustments to my Visual Studio 2017 project files. They are :

<ImportGroup Label="ExtensionSettings">
    <Import Project="$(CUDAPropsPath)\CUDA 10.1.props" />
  </ImportGroup>

  <ImportGroup Label="ExtensionTargets">
    <Import Project="$(CUDAPropsPath)\CUDA 10.1.targets" />
  </ImportGroup>

Both were set to 10.0 previously. I have a suggestion for you. I think you should set an environment variable to hold the CUDA version. It can be something as simple as CUDA_VERSION=10.1. Then those two lines could be written as follows :

<ImportGroup Label="ExtensionSettings">
    <Import Project="$(CUDAPropsPath)\CUDA $(CUDA_VERSION).props" />
  </ImportGroup>

  <ImportGroup Label="ExtensionTargets">
    <Import Project="$(CUDAPropsPath)\CUDA $(CUDA_VERSION).targets" />
  </ImportGroup>

and we wouldn’t need to change anything after an update. I did this on my systems and it works correctly. I can’t think of any issues from doing this other than having multiple versions present and that would be a major headache. What do you think?

If you’d like to see a change in any kind of CUDA behvior, my recommendation would be to file a bug at developer.nvidia.com. The specific instructions are linked in this forum posting:

[url]https://devtalk.nvidia.com/default/topic/1044668/cuda-programming-and-performance/-how-to-report-a-bug/[/url]

I don’t personally make extensive use of windows for CUDA development, and I wouldn’t be in the approval path for such suggestions, so I don’t have any important thoughts about it.