Nvidia nsight visual studio edition что такое

Обновлено: 04.07.2024

Отладка параллельного кода – процесс утомительный и умозатратный. Ошибки распараллеливания проблематично отловить из-за недетерминированности поведения параллельных приложений. Более того, если ошибка обнаружена, ее часто сложно воспроизвести снова. Бывает, что после изменения кода, сложно удостовериться, что ошибка устранена, а не замаскирована. Чаще всего, ошибки в параллельной программе являются гейзенбагами. Порой испытываешь острую потребность в максимально удобных и функциональных инструментах отладки параллельных программ.
Итак, чуть больше года назад компания NVIDIA выпустила пакет инструментов, интегрируемых в Microsoft Visual Studio 2008 sp1 и 2010 для отладки параллельных программ, написанных на CUDA под названием NVIDIA Parallel Nsight. Об этом, в свое время, писал XaocCPS на хабросообществе. С тех пор этот продукт стал более совершенным и абсолютно бесплатным. На сегодняшний день последняя версия 2.0. Рассмотрим возможные конфигурации, установку, настройку, а так же основные возможностям NVIDIA Parallel Nsight.

Возможные конфигурации

NVIDIA предлагает 4 варианта конфигурации оборудования для установки Parallel Nsight, отличающихся возможностью использования тех или иных инструментов:

Конфигурация Система с 1 GPU Система с 2 GPU Две системы, каждая с GPU Система с 2 GPU на одной машине (NVIDIA Multi-OS)
CUDA C/C++ Параллельный отладчик 0 1 1 1
Direct3D отладчик шейдеров 0 0 1 1
Direct3D графический инспектор 1 1 1 1
Анализатор 1 1 1 1

NVIDIA называет “ULTIMATE” конфигурацией 4 вариант. NVIDIA Multi-OS представляет собой виртуальную машину, с поддержкой девелопер видеодрайвера. Подумывал поднять подобную систему с помощью VMWare, но столкнулся как раз с невозможностью установки девелопер драйвера на видеоадаптер виртуальной системы.
NVIDIA предлагает следующие требование к системе, в зависимости от выбранной конфигурации:

Аппаратные требования:
Программные требования:

Установка Parallel Nsight

Для возможности отладки параллельного кода достаточно конфигурации с двумя CUDA совместимыми GPU на одной машине (конечно, было бы гораздо интереснее рассказать о конфигурации с двумя машинами, но у меня, к сожалению, на данный момент нет возможности собрать такую конфигурацию).
Итак, мне пришлось докупить одну из самых бюджетных CUDA поддерживающих карточек: GeForce 210, в дополнение к моей рабочей карточке: GeForce GTX460. Таким образом, для установки Parallel Nsight был подготовлена следующая аппаратная конфигурация:


Тип ЦП QuadCore AMD Phenom II X4 965, 3918 MHz
Системная плата Gigabyte GA-790FXTA-UD5 (3 PCI, 1 PCI-E x1, 3 PCI-E x16, 4 DDR3 DIMM, Audio, Dual Gigabit LAN, IEEE-1394)
Чипсет системной платы AMD 790FX, AMD K10
Системная память 4096 Мб
Вывод:

Видеоадаптер NVIDIA GeForce 210 (512 Мб)
Видеоадаптер NVIDIA GeForce GTX 460 (1024 Мб)
Монитор ENV LED2770h [NoDB] (AUBB1JA005271) (DVI)

В качестве операционной системы я использовал Windows 7 enterprise edition x64. Далее нам понадобится MVS не ниже 2008 sp1.

NVIDIA Nsight™ Visual Studio Code Edition (VSCE) is an application development environment for heterogeneous platforms that brings CUDA® development for GPUs into Microsoft Visual Studio Code. NVIDIA Nsight™ VSCE enables you to build and debug GPU kernels and native CPU code as well as inspect the state of the GPU and memory.

The wait is over! Download the first official release now.

Benefits

Higher Productivity

Using smart CUDA auto- code completion features improves the overall development experience and enables users to save time and effort when writing code.

Interactivity

Debugging with Nsight Visual Studio Code Edition provides diverse benefits, including code formatting, easy navigation through source code, displaying and interacting with different source files, building executables, and testing.

Remote Development Support

Nsight Visual Studio Code Edition enables developers to implement CUDA code in various cluster environments such as Virtual Machines or remote Docker containers. It also supports code development for Linux systems via the Remote – WSL extension.

Key Features


CUDA Syntax Highlighting for Code Development and Debugging

Edit code productively with syntax highlighting and IntelliSense for CUDA code. Auto-completion, go to definition, find references, rename symbols, and more all seamlessly work for kernel functions the same as they do for C++ functions.

CUDA Kernel Breakpoint Support and Kernel Execution Control

Break into a debugging session in CPU or GPU device code using standard breakpoints, including support for conditional breakpoints with expression evaluation. GUI controls allow you to step over, into, or out of statements in the source code, just like normal CPU debugging. Breakpoints are evaluated for every kernel thread and will halt execution when any thread encounters them.



GPU and Kernel State Inspection

Break into the debugger to see all the detailed information at any point in the application with GPU debugging support for register, variable, and call-stack. There is watchlist support to add specific variables of interest for tracking. Additionally, there are focus controls to manually select streaming multiprocessor (SM), warp, and lane numbers to switch the debugger focus.

NVIDIA® Nsight™ Visual Studio Edition is an application development environment for heterogeneous platforms which brings GPU computing into Microsoft Visual Studio. NVIDIA Nsight™ VSE allows you to build and debug integrated GPU kernels and native CPU code as well as inspect the state of the GPU and memory.

Version 2021.3 New Features | Revision History

NVIDIA® Nsight™ Visual Studio Edition is freely offered through the NVIDIA Registered Developer Program and as part of the CUDA Toolkit



Debugging in Optix Applications in Nsight Visual Studio Edition

Gallery


Nsight Visual Studio Edition CUDA Debugger Key Features

  • Debug your CUDA C/C++ source code directly on the latest GPU hardware
  • Debug native Visual Studio CPU and CUDA GPU code within the same debugging session
  • Use the familiar Visual Studio Locals, Watches, Memory and Breakpoints windows
  • Inspect the CUDA kernel state using customs views for GPU registers, warps, lanes, and threads for navigating massively parallel threads states and contexts


Nsight Visual Studio Edition CUDA Debugger Watch Window

  • View Source variables, PTX & SASS registers in Locals & Watch Views
  • Expressions supported in Watch view
  • Updated variables are displayed with red font
  • Struct/Vector/Array contents display on a single line
  • Array max length settings
  • Error messages for out–of-scope or invalid expressions


Nsight Visual Studio Edition CUDA Debugger Source Code View

  • View correlated Source, PTX, and SASS
  • Set breakpoints in Source and/or SASS
  • Step over, in, out, continue in source or PTX/SASS disassembly
  • Conditional breakpoints operate on source vars and PTX/SASS regs
  • Hover over variables and registers to view values


Nsight Visual Studio Edition CUDA Debugger Breakpoints View

  • Supported Breakpoints for Native(CPU) and CUDA C/C++ code, including
    Source, SASS, Function, Conditional, Data
  • Full GPU and CPU State provided while at breakpoint
  • Process and Thread selection available
  • Conditional breakpoints operate on source vars and PTX/SASS regs


Nsight Visual Studio Edition CUDA Debugger Warp Info View

  • Warp Info shows the active warps on the GPU, one warp per row
  • Arrow indicates the in-focus thread, providing state for the rest of the views
  • Focus warp (row) or thread can be changed with a mouse click to provide further state inspection (unless warp is unlaunched/done)
  • Various ‘Freeze Modes’ to for run control of other warps
  • Warps are color coded to indicate their state
  • Filtering can be done to minimize warp results
  • Columns Not shown (PC, ActiveMask, HitMask, Status)


Nsight Visual Studio Edition CUDA Debugger GPU Registers View

  • Inspect PTX, SASS, Predicate, Conditional, and Uniform registers at this configurable GPU Register view
  • Visual Studio register view can also be configured to show GPU registers
  • This view can be configured to hide/show registers sets
  • Always hides registers that are not supported by the architecture (Not a Turing GPU, so no Uniform registers shown)
  • Can select and copy-to-clipboard
  • Red text indicates updated values

More NVIDIA DevTools Visual Studio Integration


NVIDIA Nsight Integration (highlighted) under the Nsight menu

NVIDIA Nsight Developer Tools Integration for Visual Studio

In Nsight VSE 2021.3, the integrated Graphics Frame Debuggers and integrated Profilers have been removed, but don't worry, you haven't lost this functionality.
NVIDIA Nsight Integration is a Visual Studio extension that allows you to access the power of the following NVIDIA Nsight standalone tools from within Visual Studio.

    : CUDA application interactive kernel profiler : Graphics application frame debugger and profiler : System-wide performance analysis tool

When any of these tools are installed along with NVIDIA Nsight Integration , these tools will appear under the NVIDIA ' Nsight ' menu in the Visual Studio menu bar.

More Nsight Visual Studio Edition Information

Downloads

Download the latest version and corresponding dependencies

NVIDIA Developer Resources (Sign up required)

Access the latest announcements, early release candidate access, file bugs, event invites and more. Sign up today!

Product Features

List of features of Nsight Visual Studio Edition

Product Requirements

Details the hardware and software support of Nsight Visual Studio Edition

Support and Documentation

User Guide, Documentation, Forums, and more

Videos

Teaser and Instructional Videos showing Nsight Visual Studio Edition in action

NVIDIA ® Nsight Visual Studio Edition ©
NVIDIA Nsight software is the industry’s first development environment for massively parallel computing integrated into Microsoft Visual Studio, the world’s most popular development environment. Nsight is a powerful tool that allows programmers to develop GPU applications for Graphics and Compute domains, and optimize for both GPUs and CPUs, all within Microsoft Visual Studio.

GPU NATIVE Debugger
> Debug compute and graphics code directly on GPU hardware on local and remote systems
> Examine thousands of threads executing in parallel using the familiar Locals, Watch, Memory and Breakpoints windows in Visual Studio
> View GPU memory directly using the standard Memory windows in Visual Studio
> Use conditional breakpoints to quickly identify and correct errors in massively parallel code
> Identify memory access violations using the CUDA C/C++ Memory Checker
> Debug Direct3D 11 HLSL shaders
> Debug OpenGL GLSL shaders

SYSTEM and application TRACE
> Capture CPU and GPU level events, including: API calls, kernel launches, memory transfers and custom application annotations (OpenGL, Direct3D 9/11/12, CUDA, OpenCL)
> Single correlated timeline displays all captured events
> Timeline inspection tools allow for the examination of workload dependencies
> Filter and sort captured events using specialized reporting views
> Profile CUDA kernels using GPU performance counters
> Profile CUDA kernels and correlate performance analysis back to source code

Graphics FrAME Debugger
> Real-time examination of Direct 3D 9/11/12/OpenGL and Vulkan rendering calls
> Interactive examination of GPU pipeline state, including visualization of bound textures, geometry and compute buffers
> Pixel History shows all operations that affect a given pixel
> Frame Profiler identifies performance bottlenecks and GPU utilization
> Generate frame captures to C++ code for offline collaboration and analysis

Читайте также: