Installation and Setup
Installation and Setup Essentials for NVIDIA Nsight Visual Studio Code Edition
1. Installation and Setup Essentials
To reduce the chance of encountering problems when installing the NVIDIA Nsight Visual Studio Code Edition tools, consider several items in advance. For example, determine whether you want to run the tools on one machine and debug your application on another, or if you will debug on a single machine. Performing remote debugging can be advantageous because the Visual Studio environment will continue to run on the host machine even if the target machine has to be rebooted because an application crash.
Remote debugging allows you to debug over a network, which means that a target machine can be made easily available to a development team, or to members who do not have physical access to the target GPU.
Before You Start
Task | For more information, see... |
---|---|
Install the prerequisite software. |
You must have the prerequisite software on your host and target machines, using the versions recommended in the release notes for a qualified experience:
|
Review the hardware and software requirements for the product to make sure that you have the minimum or recommended configurations. | System Requirements for NVIDIA® Nsight™ Visual Studio Code software. |
Review the overview of installation procedures to make sure you understand the ways that you can configure your development system. | Target and Host Setup. |
2. System Requirements for NVIDIA Nsight VSCE Software
Minimum | Recommended | |
---|---|---|
Host Operating Systems |
Nsight VSCE is based on cuda-gdb, which supports the CUDA Toolkit supported Windows and Linux operating systems as well as the cuda-gdb supported macOS's. Note that Windows and macOS cannot be used as a target operating system (see below). These OSes are supported only as a host and only when paired with Remote-SSH as described in the Target and Host Setup For more information on remote debugging (where the host is different than the target), please visit cuda-gdb's remote debugging documentation. |
Minimum or higher |
Target Operating System |
Nsight VSCE is based on cuda-gdb , which supports the CUDA Toolkitsupported Linux OS's as debugging targets, specifically Linux x86 and Linux arm (SBSA). For information on remote debugging (where the host is different than the target), please visit cuda-gdb's remote debugging documentation. |
Minimum or higher |
CPU |
Intel(R) Pentium(R) Dual-core CPU or equivalent @ 1.6 GHz minimum |
Intel(R) >Pentium(R) Dual-core CPU or equivalent@ 2.2 GHz or higher |
Memory |
2 GB minimum |
2 GB or more |
Hard Disk Space |
330 MB for NVIDIA Nsight™ VSCE software |
On a 64-bit machine with NVIDIA Nsight™ VSCE Host software: 330 MB plus space for your project files. If using remote machine to run/debug target application, remote machine: 240 MB plus space for the debug version of your target application. |
Target Machine GPU Hardware |
Supported CUDA-Enabled GPUs lists of all CUDA-enabled devices along with their compute capability. Supported Compute Capabilities gives the technical specifications of each compute capability. |
Latest supported NVIDIA GPU |
Software | ||
CUDA Toolkit |
You must install an NVIDIA CUDA Toolkit that supports NVIDIA Nsight™ VSCE. |
Please see the release notes for the recommended CUDA Toolkit version. |
Display Driver |
You must install an NVIDIA display driver that supports NVIDIA Nsight™ VSCE. Typically, this comes with the NVIDIA CUDA Toolkit and can be installed as a CUDA Toolkit option. |
Please see the release notes for the recommended NVIDIA display driver version. |
IDE Host |
The Nsight VSCE extension requires an integrated development environment host: Microsoft Visual Studio Code |
Please see the release notes for the recommended Microsoft Visual Studio Code version. |
NVIDIA Nsight Visual Studio Code Edition supports four flexible hardware configurations:
- Single GPU System.
- Dual GPU System.
- Two systems, each with one GPU.
- Notebook equipped with NVIDIA Optimus technology.
2.1. Compute Debugger Supported Configurations
NVIDIA Nsight Visual Studio Code Edition support for NVIDIA GPUs is dependent on the associated CUDA Toolkit support for those GPUs. Please refer to the CUDA Toolkit documentation for supported GPU SMs.
3. How To: Install NVIDIA Nsight Visual Studio Code Edition
The NVIDIA Nsight Visual Studio Code Edition is an extension to Microsoft Visual Studio Code which supports GPU computing by providing
-
Declarative language configuration for CUDA syntax highlighting, bracket matching, code folding, auto-indention, etc.
-
C++ language server extensions to support CUDA-specific language features.
-
Debugger views to provide CUDA-specific debugging information.
-
IDE extensions to add productivity enhancements to the VS Code environment.
To begin, you simply need to download and install the Nsight VSCE extension.
3.1. Install the NVIDIA Nsight VSCE Software
The Nsight VSCE extension can be installed directly from within Visual Studio Code via the Extensions tab.
-
Search for Nsight in the Extensions tab.
-
Press Install to add the extension to Visual Studio Code.
Alternatively, you can download the extension from the Visual Studio Marketplace.
-
Search for Nsight.
-
Click Download Extension to download a VSIX file.
-
In the Extensions tab execute the Install from VSIX... command. This command can also be run from the Microsoft Visual Studio Code Command Palette.
-
Browse to the downloaded VSIX file, select it, and click Install.
4. Target and Host Setup
NVIDIA Nsight™ VSCE allows you to debug your applications in two different ways:
-
Local debugging, in which the host and target are on the same machine.
-
Remote debugging, in which the host and target are on two different machines.
4.1. Local Debugging
If you configure your system for local debugging, you will use a single computer to build the project and run the application to be debugged. This means that you will need to have one or more GPUs in your computer, and must meet minimum requirements. Note that CUDA debugging only requires one GPU.
Supported target machine (including local debugging) platforms are Linux x86 and Linux arm (SBSA).
See System Requirements for a list of supported GPUs and platforms.
4.2. Remote Debugging
If you choose to configure your systems for remote debugging, you will use one computer as the host machine. The host machine will run Visual Studio Code to build your project, as well as to launch debugging sessions.
Meanwhile, a separate computer is configured as the target machine. The target will run the application to be debugged.
To perform remote debugging first install the Remote-SSH Visual Studio Code extension. Use Remote-SSH to connect to the target machine to edit, build, and debug your project, similarly to if the project were local. For more information on developing projects remotely via Remote-SSH, see Remote Development using SSH and the Remote Development over SSH tutorial.
Performing remote debugging this way can be advantageous because the Visual Studio environment will continue to run on the host machine, even if the target machine has to be rebooted because of an application crash. Remote debugging also allows you to debug over a network, which means that a target machine can be made easily available to a development team, or to members who do not have physical access to the target GPU.
5. Install the NVIDIA Display Driver
It is recommended that you download and install the NVIDIA display driver for the installed CUDA Toolkit. See the release notes for more information.
If you have an NVIDIA graphics card installed on your target machine, you probably already have an NVIDIA display driver. However, NVIDIA Nsight Visual Studio Code Edition requires an updated version of the driver in order to function properly. Please see the latest release notes for compatible driver versions.
Also review the System Requirements (Target Machine GPU Hardware) to ensure that your GPU is supported.
6. Working with Samples
CUDA Samples can be downloaded for use with NVIDIA Nsight Visual Studio Code Edition tools via the NVIDIA CUDA Toolkit or the NVIDIA/cuda-samples repository on GitHub.
Notices
Notice
NVIDIA® Nsight™ Application Development Environment for Heterogeneous Platforms, Visual Studio Code Edition 2023.1.0 User GuideSend Feedback
THE INFORMATION IN THIS GUIDE AND ALL OTHER INFORMATION CONTAINED IN NVIDIA DOCUMENTATION REFERENCED IN THIS GUIDE IS PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE INFORMATION FOR THE PRODUCT, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the product described in this guide shall be limited in accordance with the NVIDIA terms and conditions of sale for the product.
THE NVIDIA PRODUCT DESCRIBED IN THIS GUIDE IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE IN CONNECTION WITH THE DESIGN, CONSTRUCTION, MAINTENANCE, AND/OR OPERATION OF ANY SYSTEM WHERE THE USE OR A FAILURE OF SUCH SYSTEM COULD RESULT IN A SITUATION THAT THREATENS THE SAFETY OF HUMAN LIFE OR SEVERE PHYSICAL HARM OR PROPERTY DAMAGE (INCLUDING, FOR EXAMPLE, USE IN CONNECTION WITH ANY NUCLEAR, AVIONICS, LIFE SUPPORT OR OTHER LIFE CRITICAL APPLICATION). NVIDIA EXPRESSLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR SUCH HIGH RISK USES. NVIDIA SHALL NOT BE LIABLE TO CUSTOMER OR ANY THIRD PARTY, IN WHOLE OR IN PART, FOR ANY CLAIMS OR DAMAGES ARISING FROM SUCH HIGH RISK USES.
NVIDIA makes no representation or warranty that the product described in this guide will be suitable for any specified use without further testing or modification. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to ensure the product is suitable and fit for the application planned by customer and to do the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this guide. NVIDIA does not accept any liability related to any default, damage, costs or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this guide, or (ii) customer product designs.
Other than the right for customer to use the information in this guide with the product, no other license, either expressed or implied, is hereby granted by NVIDIA under this guide. Reproduction of information in this guide is permissible only if reproduction is approved by NVIDIA in writing, is reproduced without alteration, and is accompanied by all associated conditions, limitations, and notices.
Trademarks
NVIDIA, the NVIDIA logo, and cuBLAS, CUDA, CUDA-GDB, CUDA-MEMCHECK, cuDNN, cuFFT, cuSPARSE, DIGITS, DGX, DGX-1, DGX Station, NVIDIA DRIVE, NVIDIA DRIVE AGX, NVIDIA DRIVE Software, NVIDIA DRIVE OS, NVIDIA Developer Zone (aka "DevZone"), GRID, Jetson, NVIDIA Jetson Nano, NVIDIA Jetson AGX Xavier, NVIDIA Jetson TX2, NVIDIA Jetson TX2i, NVIDIA Jetson TX1, NVIDIA Jetson TK1, Kepler, NGX, NVIDIA GPU Cloud, Maxwell, Multimedia API, NCCL, NVIDIA Nsight Compute, NVIDIA Nsight Eclipse Edition, NVIDIA Nsight Graphics, NVIDIA Nsight Integration, NVIDIA Nsight Systems, NVIDIA Nsight Visual Studio Edition, NVIDIA Nsight Visual Studio Code Edition, NVLink, nvprof, Pascal, NVIDIA SDK Manager, Tegra, TensorRT, Tesla, Visual Profiler, VisionWorks and Volta are trademarks and/or registered trademarks of NVIDIA Corporation in the United States and other countries. Other company and product names may be trademarks of the respective companies with which they are associated.