NVIDIA® Nsight™ Application Development Environment for Heterogeneous Platforms, Visual Studio Edition 5.2 User Guide
Send Feedback
The NVIDIA Nsight CUDA Debugger supports the Visual Studio Memory window for examining the contents of memory on a GPU. The CUDA Debugger supports viewing shared, local, and global memory.
You can view values in GPU memory only when running a CUDA application, with the target application halted at a breakpoint in CUDA source code. Keep the following in mind:
Shared Memory:
- Is accessible by any thread of the block from which it was created.
- Has the lifetime of the block.
Local Memory:
- Is only accessible by the thread.
- Has the lifetime of the thread.
Global Memory:
- Is accessible from either the host or the device.
- Has the lifetime of the application.
Type either the hexadecimal value or the name of a valid pointer that is in the current lexical scope.
![]() |
Tip: Right-click on the Memory window to change the way memory contents are displayed, including displaying memory contents as floating-point numbers. |
Make sure to cast the pointer to a pointer in Shared memory by using the following syntax:
(__shared__ float*)p
![]() |
Note: The following examples show the syntax used to cast a pointer/address to a different memory space:
|
NOTE: You cannot change the value in GPU memory by editing the value in the Memory window.
The Memory window opens.
The memory window displays the values at the addresses that correspond to the variable (or pointer).
__local__
, __const__
or __shared__
make sure the Visual Studio Memory view is set to Re-evaluate automatically. This will ensure that the memory shown is for the correct memory space. Without this, the display can change to an address which defaults to global memory.
NOTE: You cannot change the value in GPU memory by editing the value in the Locals window.
NVIDIA® Nsight™ Application Development Environment for Heterogeneous Platforms, Visual Studio Edition User Guide Rev. 5.2.161206 ©2009-2016. NVIDIA Corporation. All Rights Reserved.