NVIDIA® Nsight™ Development Platform, Visual Studio Edition 2.2 User Guide
                
Send Feedback
                
            
If you have projects that you created before you installed NVIDIA Nsight, you might need to modify your project to work with the tools.
For example, you need to configure the project to use the CUDA compiler that ships with the debugger software. Why? Because the compiler that ships with the debugger software generates the appropriate debug symbolics. If you use a different compiler, such as the compiler that ships with an early version of the CUDA SDK, your application will not necessarily contain the debug symbolics that the debugger and the analysis tools require.
You can use the configuration files to configure your existing project so that the project (and resulting build output) works properly with the debugger and analysis tools.
To configure an existing project to work with the NVIDIA Nsight tools:
The procedures on this page explain how to perform the above tasks.
 
 
The project now uses the build rule you enabled. The .rules file defines several properties that Visual Studio uses to build the project. For example, one of the properties is called "Compiler Path," for which the default value, in the case of the CUDA Driver API Build Rule (v4.2), is:
DefaultValue="$(CUDA_PATH_V4_2)\bin\nvcc.exe"

NVIDIA Nsight defines CUDA_PATH_V4_2 as a system environment variable. For more information, see Environment Variables. 
To change .cu file properties:
The tool you select should match the build rule you specified. For example, if you chose the NvCudaRuntimeApi.v4.2.rules build rule so that the project would be compatible with CUDA Runtime API, then select Runtime API.
The compiler that ships with the NVIDIA Nsight supports a switch for  generating debug symbolics: - G0.
If you use the command line to build your project, make sure to add:
 -G0 
to the NVIDIA CUDA Compiler (nvcc) command line. The switch causes the compiler to generate CUDA debug symbolics.
You only need this when building from source files containing GPU code. You  might notice a runtime slowdown when you are actively debugging code built with  the  -G0 switch.  We recommend that you include CUDA debug symbolics only as  needed. Building only the few files of interest with -G0 will give you a better  debugging experience.
Reference
                
Macros for Build  Commands and Properties 
List of Common Properties and Parameters
How Tos
                
How To: Set Build Options in VS 2008
            
Support
                
VS2008:  Add custom build rule to a Property Sheet (vsprops)
            
| NVIDIA® Nsight™ Development Platform, Visual Studio Edition User Guide Rev. 2.2.120522 ©2009-2012. NVIDIA Corporation. All Rights Reserved. | |