GPU Variable and Data Display
TotalView can display variables and data from a CUDA thread.
Add an expression from the Call Stack to the Data View to display parameter, register, local, and shared variables, as shown in Figure 129. The variables are contained within the lexical blocks in which they are defined. The type of the variable determines its storage kind (register, or local, shared, constant or global memory). The address is a PTX register name or an offset within the storage kind.
Figure 129, The Data View displaying a parameter
The identifier @local is a TotalView built-in type storage qualifier that tells the debugger the storage kind of "A" is local storage. The debugger uses the storage qualifier to determine how to locate A in device memory. The supported type storage qualifiers are shown in Table 13.
Table 13: Supported Type Storage Qualifiers
Storage Qualifier
An offset within executable code storage
An offset within constant storage
An offset within generic storage
An offset within frame storage
An offset within global storage
An offset within local storage
An offset within parameter storage
Input parameter
Output parameter
An offset within shared storage
An offset within surface storage
An offset within texture sampler storage
An offset within texture storage
Built-in runtime variables (see CUDA Built-In Runtime Variables)
A PTX register name (see PTX Registers)
A PTX special register name (see PTX Registers)
Statically allocated managed variable. See Managed Memory Variables.
The type storage qualifier is a necessary part of the type for correct addressing in the debugger. When you edit a type or a type cast, make sure that you specify the correct type storage qualifier for the address offset.