In Windows, the NVIDIA CUDA compiler nvcc
uses a Visual C/C++ compiler behind the scenes. To call nvcc
, it is required that the correct environment variables are set. As a developer, this is typically achieved by running nvcc
from a Visual Studio Developer command prompt.
Quasar detects the C/C++ compiler to use for NVCC automatically. It is therefore not necessary to run Quasar/Redshift from a developer command prompt. However, not every version of CUDA is compatible with any version of Visual C/C++.
The following chart shows which combinations of Visual Studio versions vs. CUDA versions are supported by the NVIDIA CUDA compiler (NVCC). In case you are in an unsupported scenario, it is best to either upgrade Visual Studio or downgrade CUDA. The best GPU performance is generally obtained using the most recent CUDA version.
Note that since CUDA v6.5, only 64-bit code is supported (x64 architecture). The table below is obtained from the CUDA Release notes from different CUDA releases.
CUDA v12.* | CUDA v11.6 | CUDA v10.1-11.5, v10.0 | CUDA v9.* | CUDA v8.0 | CUDA v7.* | CUDA v6.5 | CUDA v6.0 | CUDA v5.5 | CUDA v5.0 | ||
---|---|---|---|---|---|---|---|---|---|---|---|
Visual C++ 2022 | X | X | |||||||||
Visual C++ 2019 | X | X | |||||||||
Visual C++ 2017 | X | X | X | X | X | ||||||
Visual C++ 2015 | X | X | X | X | |||||||
Visual C++ 2013 | X | X | X | X | X | X | |||||
Visual C++ 2012 | X | X | X | X | X | X | X | X | |||
Visual C++ 2010 | (X) | X | X | X | X | X | X | ||||
Visual C++ 2008 | X | X | X | X |
(X): deprecated, but still works
Also note that older GPUs (e.g., Geforce 400 series) can only be targetted using CUDA v9. In this case, you are restricted to Visual C++ 2012/2013/2015/2017.
You may install Visual Studio community edition (recent versions) using the following links:
Visual Studio version | Download link |
---|---|
2012 | Download visual Studio 2012 community |
2015 | Download visual Studio 2015 community |
2017 | Download visual Studio 2017 community |
2019 | Download visual Studio 2019 community |
2022 | Download visual Studio 2022 community |
During the installation, make sure you check “C/C++ compiler”.