NVIDIA® Nsight™ Development Platform, Visual Studio Edition 2.2 User Guide
Send Feedback
CUDA Toolkit 4.0 includes Visual Studio 2008 projects for all the NVIDIA GPU Computing SDK samples, and many of them also include their Visual Studio 2010 equivalents. However, with CUDA version 3.2, the NVIDIA GPU Computing SDK samples were shipped with only the Visual Studio 2008 projects. This topic covers the approach that can be taken to convert a CUDA SDK sample from Visual Studio 2008 to Visual Studio 2010.
As a specific example, we will be using the Particles VS 2008 project from the NVIDIA GPU Computing SDK 3.2 samples, with the 32-bit debug project configurations:
![]() | The CUDA 3.2 toolkit requires the Microsoft v90 Platform Toolset to build CUDA-based applications. This is because the NVIDIA CUDA Toolkit uses the Microsoft C++ v9.0 compiler (CL.exe) to build CUDA applications. The v90 Platform Toolset does not ship with Visual Studio 2010. For that reason, you need to install the v90 Platform Toolset, and then specify within your project properties that the v90 Platform Toolset be used as the platform toolset for building your CUDA application. If you have Visual Studio 2008 SP1 installed, you already have the v90 Platform Toolset. If you do not have Visual Studio 2008 SP1 installed, you need to:
You can download the Visual C++ 2008 Express Edition with SP1 from the Microsoft web site. However, do note that cross compiling to 64-bit is not possible with Visual C++ 2008 Express Edition with SP1. |
![]() | If new .cu files are added to the project after adding the build customization, step 5 would not be required as the Item Type of these newly added .cu files will be set automatically. |
![]()
Set the Target Machine Platform to 32-bit (--machine 32) for 32-bit project configurations and 64-bit (--machine 64) for 64-bit project configurations.
b. Under the Host sub-tab:
- Change the Runtime Library value to either Multi-Threaded(/MT) for release project configuration, or Multi-Threaded Debug (/MTd) for debug project configuration.
For this example, we will change the Runtime Library value to Multi-Threaded Debug (/MTd).
![]()
8. The conversion of CUDA Visual Studio 2008 projects to Visual Studio 2010 is now completed, and the project can now be built in VS 2010.
NVIDIA® Nsight™ Development Platform, Visual Studio Edition User Guide Rev. 2.2.120522 ©2009-2012. NVIDIA Corporation. All Rights Reserved. | |