Compute Visual Profiler User Guide
Compute Visual Profiler User Guide
User Guide
DOCUMENT CHANGE HISTORY
DU-05162-001_v03
Overview ...................................................................................1
Getting Started .................................................................................. 1
Installation and Setup ....................................................................... 2
Windows .................................................................................... 2
Linux ........................................................................................ 2
MacOS X .................................................................................... 2
Running the Compute Visual Profiler ...................................................... 2
Windows .................................................................................... 2
Linux ........................................................................................ 3
MacOS X .................................................................................... 3
Xterm ....................................................................................... 3
CUDATM and OpenCLTM Support ................................................................ 4
Compute Visual Profiler Files and Settings .................................................. 5
Compute Visual Profiler Usage ................................................................ 7
Graphical User Interface (GUI) at a Glance .............................................. 7
Session Frame (Left) ..................................................................... 9
Workspace Frame (Right) ................................................................ 9
Output Frame (Bottom) ................................................................. 13
Exploring a Saved Project .................................................................. 14
Creating a New Project .................................................................... 15
This document is intended for users of Compute Visual Profiler for NVIDIA® CUDATM
technology. Compute Visual Profiler is a graphical user interface based profiling tool
that can be used to measure performance and find potential opportunities for
optimization in order to achieve maximum performance from NVIDIA® GPUs.
Compute Visual Profiler provides metrics in the form of plots and counter values
presented in tables and as graphs. It tracks events with hardware counters on signals in
the chip; this is explained in detail in the chapter entitled, “Compute Visual Profiler
Counters.” This document should be used in conjunction with the CUDA C Programming
Best Practices Guide from NVIDIA.
Note that in CUDA version 3.1 onwards, NVIDIA’s CUDA Visual Profiler and OpenCL
Visual Profiler have been integrated into a single application called–Compute Visual
Profiler.
The new Analysis feature in Compute Visual Profiler 4.0 provides a performance
analysis of the application based on the profiling data. The feature also provides various
optimization hints to improve application performance.
GETTING STARTED
In order to run Compute Visual Profiler you need the following:
CUDA compatible NVIDIA graphics card
NVIDIA CUDA Toolkit, and
NVIDIA Display Driver (latest version)
Refer to the Getting Started Guide for your operating system for help with installation.
Note that if the correct versions of Microsoft Visual C++ DLLs are not available when
you run Compute Visual Profiler, the following error is displayed:
Application failed to start because side-by-side configuration is
incorrect.
Linux
The installation is part of the CUDA toolkit installation. The files are installed under
"<CudaToolkitDir>/computeprof" where <CudaToolkitDir> is the directory
under which the CUDA Toolkit is installed.
MacOS X
The installation is part of the CUDA toolkit installation. The files are installed under
"<CudaToolkitDir>\computeprof" where <CudaToolkitDir> is the directory
under which the CUDA Toolkit is installed.
Linux
> <CudaToolkitDir>/computeprof/bin/computeprof &
MacOS X
From Finder run:
"<CudaToolkitDir>\computeprof\[Link]"
Xterm
From Terminal run:
"<CudaToolkitDir>\computeprof\[Link]\Contents\MacOS\compu
teprof"
This dialog box allows first time users to navigate Visual Profiler more effectively. It
allows you to:
Open recently saved projects.
Open projects that are <CudaToolkitDir>\computeprof\projects folder
Import previously saved .csv data from previous profiler runs
Click on Help to go directly to online help information about Compute Visual Profiler.
For future launches of the Compute Visual Profiler, this dialog box may be disabled by
un-checking the “Show this dialog on startup” check box.
dynsmemperblock
The kernel option 'dynsmemperblock' is supported only for CUDA. The warning
NV_Warning: Ignoring the invalid profiler config option: dynsmemperblock is
displayed after each profiling run if this option is selected for OpenCL.
localworkgroupsize
The kernel option 'localworkgroupsize' is valid only for OpenCL. If this option is
selected for a CUDA program a column 'localblocksize' is added to the Profiler
Table, but this column is hidden by default.
The type of session—CUDA or OPENCL, is shown within square parentheses after the
session name:
Context_0 [CUDA] or Context_1 [OPENCL]
The column names in the Profiler Table or the summary table for a context are displayed
based on the compute language for the context. In the CUDA context, CUDA
terminology is used and in the OpenCL context OpenCL terminology is used.
A project can consist of sessions containing a mix of CUDA program profiling sessions
and OpenCL program profiling sessions. To distinguish such projects from old projects,
a new project file extension .cvp is used. Support for old projects is provided and you
can open an old CUDA project (file extension '.cpj') or an old OpenCL project (file
extension '.oclpj'). However, when you save existing .cpj or .oclpj projects the old
projects are saved in the new format with the .cvp file extension.
Each program run is referred to as a session. It is recommended that you save profiling
data for multiple sessions for useful analysis of your program. A group of sessions is
called a project.
The following list of Compute Visual Profiler settings are saved across different
Compute Visual Profiler sessions.
Last opened project path
Method Colors
Recent files list
Recent programs
Recent work Dirs
Show Output window
Demangle Method Names
Main Window/Size
Main Window/Maximized
Global view dialog box/Size
Session view dialog box/Size
Horizontal Splitter/Sizes
Vertical Splitter/Sizes
Profiler Table/Hide Zero Columns
Summary Table/Show Average
Summary Plot/Average
Displayed Summary Plot/Percentage
Displayed Height Plot/Fit in window
Height Plot/Show CPU Time
Height Plot/Show Legend
Height Plot/Use global scale
Width Plot/Enable time stamp
Width Plot/Fit in window
Width Plot/Maximum bar width
Width Plot/Show CPU Time
Width Plot/Show legend
Width Plot/Start time stamp at zero
Width Plot/Type
On Windows, these settings are saved in the system registry at the location:
HKEY_CURRENT_USER\Software\NVIDIA\Compute Visual Profiler
The Compute Visual Profiler Help cache is saved in the folder shown below:
Linux : /home/<username>/.local/share/data/NVIDIA
Corporation/Compute Visual Profiler
A project, saved as a .cvp file, may contain multiple sessions. Multiple sessions can be
saved in a single project file and analyzed at a later point in time. Counter data is saved
in .csv files and trace data is stored in the .trc files.
Right-clicking on a session item in the tree view (left frame) displays the following
context sensitive menu items related to customizing the session:
Rename: Rename the current session.
Delete: Delete the current session.
Copy settings to current: Copy settings for the current session as the session settings
to be used for a new profiling session.
Session level summary plot: Displays the GPU Utilization Plot.
In addition, counter information and selected options are displayed as shown in Figure 4
and Figure 5 respectively.
Right-clicking on a Device (level below Session) item in the tree view displays the Device
Summary Plot.
Context
Right-clicking on a context item (level below device) in the tree view displays the
following context sensitive menu items:
1. Summary table (See section entitled, ”Summary Table”)
Kernel table (See section entitled, ”Kernel Table”)
Memcopy table (See section entitled, ”Memcopy Table”)
GPU time summary plot (See section entitled, ”GPU Time Summary Plot”)
GPU time height plot (See section entitled, ”GPU Time Height Plot”)
GPU time width plot (See section entitled, ”GPU Time Width Plot”)
Comparison summary Plot (See section entitled, ”Comparison Summary Plot”)
CUDA API Trace (See section entitled, “CUDA API Trace”)
The workspace to the right of the tree view frame contains tabbed windows for each
session, each device in a session and for each context for a device. The different
windows for each context are shown as different tabs:
Right-clicking on the table headers of the Profiler Output table and Summary table
allows you to customize the columns displayed.
Go to the Profiler Output (or Summary) Table Right-click on any cell table header.
3. Select settings for a new session by using the main menu option SessionSession
settings.
4. Browse and select the Compute program to profile.
5. Change the working directory if it is different from the program directory.
6. Execute the Compute program by clicking Launch in the Session settings dialog box.
If the Compute program is correctly executed the profiler output is displayed.
Compare the profiler output for Session1 and Session2.
7. Right-click on the appropriate row or column in the profiler output or summary
table for a session to try the Profiler counter plot and Column plot.
8. Exit Compute Visual Profiler using the main menu option FileExit from the main
menu.
Most operations can be conducted using the File pull down menu or the toolbar situated
right below the Menu bar.
The Menu bar consists of the main menu options: File, Session, View, Options, Window,
and Help. See the description below for details on the menu options.
The Toolbar icons fall into four main groups: File, Profile, Session View Settings, and
Tables and Plots. They provide options for file and project management, session
settings, and the various output formats.
File
On the main menuClick on File. Figure 8. shows the File pull down menu.
Session
On the main menuClick on Session
Figure 10 shows the Session pull down menu.
Global Memory Throughput: Display overall application level global memory read
throughput, global memory write throughput and overall global memory
throughput.
Rename: Rename the current session.
Delete: Delete the current session. This is same as the Session context menu Delete
option.
Copy settings to current: Copy settings for the current session as the session settings
to be used for a new profiling session.
Session settings
As shown in Figure 11, the Session setting dialog has three tabs:
Session
Profiler Counters
Other Options
Session Tab
On the main menuClick on SessionClick on Session settingsClick on the Session
tab
Using this tab customizes your session; the following options are available:
Session Name: Name of the profiler session. By default a new session name is chosen
(Session1, Session2 ...). This can be changed by the user.
Launch: Select the Compute program to be profiled.
Working Directory: Select the working directory to be used for running the Compute
program.
Arguments: Command line arguments to be passed to the Compute program.
Max. execution time (in seconds): Select maximum time to wait for Compute
program execution completion. After this cutoff time the program is aborted.
Run in separate window: This option is useful for console applications which accept
some keyboard input. In this case the Compute program is run from a separate
window. The standard output and standard error for the Compute program is
shown in this separate window.
Note: Currently this option is supported only on Linux and a new xterm window is
opened.
CUDA API trace: This option is used to collect CUDA driver API call information.
Profiler Counters are logically grouped based on their functions. Since only a few of the
selected profiler counters can be collected for a single program run - the Compute
program should be run multiple times.
Using this tab, customize the profile counters of interest; the following options are
available:
Device: Selection of a device in this option displays the list of counters that are
supported on that device. The user can then select the desired counters from this list.
If device 0 is selected in device selection then only profiler counters supported on
device 0 are listed for selection. If multi-device option is selected then all the
counters supported on all devices (device 0, device 1...) are selected. In this case
device specific counters are ignored for contexts which are run on other devices. The
following warning message is displayed in the output window:
NV_Warning: Ignoring the invalid profiler config option:
gld_incoherent.
Note: Selecting a device from the Session tab does not run the program on the
device selected; the user has to handle the device selection in the program.
You can select or de-select all counters by using the Select All Counters check box.
You can also select any sub-set of specific counters using the check boxes for each
counter.
You can enable or disable normalization of counter values by using the Normalize
counters check box.
Profiler counters are available only with CUDA toolkit version 1.1 or later.
Using this tab, customize other metrics of interest for the session; the following options
are available:
Timestamp: Enable option to include time stamps for kernel/method launching. GPU
timestamp is the time when a method starts execution on the GPU. GPU timestamps
are shifted in origin, to make the minimum GPU timestamp zero, across all devices
and all contexts in a session.
Stream id: Enable option to include stream id for kernel/method. This feature is
available only with CUDA toolkit version 1.1 or later.
Memory Transfer Size: It is to be enabled for describing the size of memory transfer.
It outputs the total size in bytes at the Memcopy table when profiling was done with
this option enabled.
Host Memory Transfer Type: It specifies if the host memory from/to which data is
transferred, is pageable or page-locked.
Kernel Options: This is a group of the following options:
● Grid Size: It is to be enabled to get dimensions of grid in terms of blocks (2
dimensional) in Kernel table.
● Thread Block Size: Itis to be enabled to get dimensions of a block in terms of
threads (3 dimensional).
● Dynamic shared memory size: It is to be enabled to get Dynamic shared memory
size.
● Static shared memory size: It is to be enabled to get Static shared memory size.
● Register per thread: It is to be enabled to get Register count per thread.
● Local Block Size: If workgroupsize has been specified by the user, this option
would be 1, otherwise it would be 0(used only for OpenCL.)
View
On the main menu Click on View
Figure 14 shows the View pull down menu.
Summary Table
For a selected context in the left frame (Sessions tree view):
On the main menu Click on View Click on Summary table
The summary table for the selected context within the current session is displayed in the
right frame. The rows in the table are sorted in decreasing order of total GPU time and
memcopy is shown as the last row.
For a description of the derived statistics please refer to the section entitled “Supported
Derived Statistics”.
Kernel Table
For a selected context in the left frame (Sessions tree view):
On the main menu Click on View Click on Kernel table
Memcopy Table
On the main menu Click on View Click on Memcopy Table
The GPU time summary plot for the current session is displayed. This is same as
selecting the GPU Time Summary plot option from the Session context menu.
The GPU time height plot for the selected context in the current session is displayed.
This is same as selecting the GPU time height plot option from the Session context
menu.
The GPU time width plot for the selected context in the current session is displayed. This
is same as selecting the GPU time width plot option from the Session context menu.
Comparison plot
For a selected context in the current session:
On the main menu Click on View Click on Comparison summary plot
Options
On the main menu Click on Options. Figure 15 shows the Options pull down menu.
Session Windows Layout Setting: Change settings for display of multiple session
windows. The choices are:
● Maximize
● Cascade
● Tiles
Environment Variable Settings: Change environment variable settings used by the
Compute program.
This dialog box can be invoked using the main menu option OptionsSession View
Settings or the toolbar. This dialog box allows the changing of settings for the different
views for the current session. There is a separate tab for different views. The dialog box
is opened with the tab corresponding to the current view. Only tabs for currently created
views can be selected.
Method Display Options: One of the following options to display method names :
● Use Full Name: Full Mangled name is displayed.
● Use Base Name: Only base name is displayed.
● Use Base Name with suffix: Full Mangled name with suffix is displayed.
Show Average Data: Enable/Disable showing average data values. When this option
is disabled the sum total across all the calls for a method are shown. When this
option is enabled the total value is divided by the number of times the method is
called and this average value for a method is displayed. This option is disabled by
default.
Column Shown: Lists columns which are to be shown. Can select and move columns
from hidden list to shown list using <<.
Column Hidden: Lists columns which are to be hidden. Can select and move
columns from shown list to hidden list using >>. The CPU usec and all counter
columns are hidden by default.
Max Bar Width: Maximum width of a bar in pixels. For this option the plot display is
immediately updated and so one can interactively choose an appropriate value.
Height Options: Choose option to use for bar height.
Split Options- choose between No Split or Show all devices.
● No Split: A single horizontal group of bars is displayed. Even in case of multiple
streams or multiple devices the data is displayed in a single group.
● Split on Device: In case of multiple devices one separate horizontal group of bars is
displayed for each device.
● Split on Stream: In case of multiple devices one separate horizontal group of bars is
displayed for each stream.
Apply and OK change the view properties temporarily and permanently, respectively.
The Default View Settings dialog box allows you to change the default settings which are
used for subsequent new session views. The tabs displayed in this window are similar to
the tabs displayed in the OptionsSession View Settings dialog box (see Figure 16,
Figure 17, and Figure 18.)
Window
On the main menu Click on Window. Figure 21 shows the Window pull down menu.
Help
On the main menu Click on Help
Figure 22 shows the Help pull down menu.
MAIN TOOLBAR
The first row in the top frame shows the main menu options:
File, Session, View, Options, Window, and Help.
As illustrated in Figure 23, the second row in the top frame has four groups of toolbar
icons.
GPU time width plot: The behavior is same as the View GPU time width plot menu
option
CUDA API trace: The behavior is same as the View->CUDA API trace table menu
option
Note that in order to customize your working environment you may enable or disable
certain toolbar buttons. Right-click anywhere on toolbar for a pop-up that allows you to
enable/disable toolbar buttons that fall under the File and Profiler toolbar category.
profiler counters are enabled kernel launches are blocking. Asynchronous memory
copy requests in different streams are non-blocking.
Stream Id : Identification number for the stream
Kernel Options Columns: The columns are described as follows:
Table 3 shows the columns that are displayed for kernel methods.
Profiler GridSize Thread Block Size Dyn smem Sta smem Reg per
Occupancy Counters [X, Y, Z] [X, Y, Z] per block per block thread
Table 4 shows the columns that are displayed for memcopy options.
SUMMARY TABLE
The Summary table menu is described in the section entitled, “Summary Table”.
A typical summary table is shown in Table 5. See the section entitled, “Summary Table
Tab” on how to select columns to be displayed.
An analysis of GPU utilization for the CUDA context is carried out at this level and
appropriate hints are provided, for example usage of streams to improve overlap
between kernel execution and memory copies.
Limiting Factor Identification – In the Analysis window, this default tab displays
important statistics for the kernel for example the min/max/avg gpu time for kernel
at each call and block/grid dimensions amongst others. It shows
● The performance limiting factor for the kernel which indicates if the application is
more compute bound or memory bandwidth bound.
● The key parameters for example IPC (Instructions per Cycle), Memory throughput
and occupancy of the kernel and compares them with the corresponding peak
values for that device which helps in identifying the limiting factor for the kernel.
Occupancy Analysis
Occupancy Analysis – This gives the theoretical kernel occupancy and identifies the
limiting factor for occupancy. It is calculated using the static parameters of the
kernel like launch configuration, shared memory, and register usage.
The table shown in kernel analysis window displays derived statistics and raw
counters for each call for the kernel for respective analysis tab. Clicking Show all
columns displays all the columns that are available in the profiler table for that
kernel.
Use File->Export table to export the profiler table in csv format, filtered for the
kernel.
It shows GPU utilization for all the GPUs for that session and provides suitable
optimization hints.
It shows GPU utilization for the device by showing the distribution of GPU time
over kernel execution and memory copy and it also gives the overlap time between
memory copy and kernel execution. It also provides suitable hints towards
improving the application performance.
The Summary profiling data bar plot has one bar for each method. The bars are sorted in
decreasing GPU time and the bar length is proportional to cumulative GPU time for a
method
The Device level summary plot has one bar for each method. Bars are sorted in
decreasing GPU time. The bar length is proportional to the cumulative GPU time for a
method across all contexts for a device.
The Session level summary plot has one bar for each device used. The bar length is
proportional to GPU utilization which is the proportion of time that GPU spent on the
execution of a particular method to the total time interval from GPU start to end. The
values are presented in percentage format.
The GPU time height plot is a bar diagram in which the height of each bar is
proportional to the GPU time for a method; a different bar color is assigned for each
method. The width of each bar is fixed and the bars are displayed in the order in which
the methods are executed. When the Fit In Window (OptionsSession View
SettingsClick on Height Plot tabCheck Fit In Window box) option is enabled the
display is adjusted so as to fit all the bars in the displayed window width. In this case
bars for multiple methods can overlap. The overlapped bars are displayed in decreasing
order of height so that all the different bars are visible. When the Show CPU Time
option (OptionsSession View SettingsClick on Height Plot tabCheck the Show CPU
Time box) is enabled the CPU time is shown as a bar in a different color on top of the
GPU time bar. The height of this bar is proportional to the difference of CPU time and
GPU time for the method.
A legend which shows the color assignment for different methods is displayed if the
Show Legend box is checked.
The plot can customized as described in the section entitled, “Height Plot Tab”; the
dialog box with options is shown in Figure 19.
The GPU time width plot is a bar diagram in which the width of each bar is proportional
to the GPU time for a method. A different bar color is assigned for each method. A
legend which shows the color assignment for different methods is displayed. The bars
are displayed in the order in which the methods are executed. When time stamps are
enabled the bars are positioned based on the time stamp. The height of each bar is based
on the option chosen.
The plot can customized as described in the section entitled, “Width Plot Tab”; the
dialog box with options is shown in Figure 20.
The Profiler Counter bar plot displays profiler counter values for a GPU Method from
the profiler output table or the summary table. There is one bar for each profiler counter.
Bars are sorted in decreasing profiler counter value. The bar length is proportional to
profiler counter value.
The Profiler output table column plot displays a bar graph of the selected column of
values from the profiler output table or summary table. There is one bar for each row in
the table. Bars are sorted in decreasing column value. The bar length is proportional to
column value. Figure 37 displays the CPU time since a cell on the CPU time was
selected.
As shown in Figure 38, the dialog box Select Device of Compare Session is presented for
selecting the device on which the sessions are compared, if multiple devices are present.
Note that in case of a single device the Select Device of Compare Session dialog box will
not appear.
Select the deviceClick on OK.
Next, a dialog box as shown in Figure 39, allows you to select the columns that may be
used for comparison.
Figure 40 shows the Comparison Summary Plot. Selected columns for matching kernels
from the two sessions are grouped together. For each matched kernel from the compare
session, a percentage increment or decrement with respect to base session is displayed at
the right end of the bar. In addition to the matched pairs, the unmatched kernels’
column values are shown. At the bottom of the plot two bars with total column values
for the two sessions are shown.
If multiple contexts exist, a context selection dialog is presented along with a column
selection dialog. Based on these selections, the comparison summary plot is displayed.
The plot groups matching methods from two contexts (chosen from base and compare
sessions) and plots the values of the selected columns together. In addition, non-
matching methods are plotted separately. Finally the total values are compared at the
bottom.
The CUDA API trace helps the user to understand the CPU side overhead for CUDA
driver API calls and specifically to understand the overhead involved for each kernel
launch and memory transfer request.. Capturing of CUDA Driver API calls can be
enabled by selecting API trace in the Session settings dialog.
Or,
Go to the left frame Sessions tree view Right-click on contextSelect CUDA API
trace
The API trace view displays two horizontal rows of bars. The top row of bars shows the
GPU methods and the bottom row of bars shows the CUDA driver API functions. Each
GPU method or API is represented by a bar with a width proportional to the time of
execution. The bars are displayed in time order along the horizontal direction based on
the start time. A different color is assigned to each GPU method and all APIs are shown
in the same color. Consult the legend for the color used for different GPU methods and
for APIs.
The attributes for a GPU method or an API can be viewed by pointing the cursor on the
bar. The following attributes are displayed for a CUDA driver API:
API name: Name of CUDA driver API function
Context ID: GPU context ID
Thread ID: CPU thread ID
Process ID: CPU process ID
Stream ID: GPU steam ID
Return value: API call return value
Start time stamp: Start time of an API call in micro seconds
Time duration: Time duration for execution of a API in micro seconds
Performance counter values represent events within a thread warp; they do not
correspond to individual thread activity. For example, a divergent branch within a
thread warp will increment the divergent_branch counter by one. Therefore the final
counter value contains information for all divergent branches in all warps. In addition,
the profiler can only target one of the multiprocessors in the GPU, so the counter values
will not correspond to the total number of warps launched for a particular kernel. For
this reason, when using the performance counter options in the profiler the user should
always launch enough threads blocks to ensure that the target multiprocessor is given a
consistent percentage of the total work. In practice for consistent results, it is best to
launch at least 2 times as many blocks as there are multiprocessors in the device on
which you are profiling.
Note that the counter values for the same application can be different across different
runs even on the same setup since it depends on the number of thread blocks which are
executed on each multiprocessor. For consistent results it is best to have number of
blocks for each kernel launched to be at least equal to or a multiple of the total number
of multiprocessors on a compute device. In other words when profiling the grid
configuration should be chosen such that all the multiprocessors are uniformly loaded
i.e. the number of blocks launched on each multiprocessor is same and also the amount
of work of interest per block is the same. This will result in better accuracy of
extrapolated counts, such as memory and instruction throughput, and will also provide
more consistent results from one run to the next run.
In every application run only a few counter values can be collected. The number of
counters depends on the specific counters selected. Compute Visual Profiler executes the
application multiple times to collect all the counter values. Note that in case the number
blocks in a kernel is less than or not a multiple of the number of multiprocessors the
counters values across multiple runs will not be consistent.
Refer to the Best Practices Guides for CUDA and OpenCL for further details.
If the global memory access by all threads of a half-warp does not fulfill the coalescing
requirements it is called a non-coalesced access and a separate memory transaction is
issued for each thread and throughput is significantly reduced. The coalescing
requirements on devices with compute capability 1.2 and higher are different from
devices with compute capability 1.0 or 1.1. Refer to the CUDA C Programming Guide for
details. The profiler counters related to global memory count the number of global
memory accesses or memory transactions and they are not per warp. They provide
counts for all global memory requests initiated by warps running on a TPC.
For single multiprocessor counters the counter value is divided by the number of thread
blocks which were run on multiprocessor 0. The profiler counter "sm_cta_launched"
is used to count thread blocks which were run on multiprocessor 0.
For TPC counters the counter value is divided by the number of thread blocks which
were run on TPC 0. The profiler counter "cta_launched" is used to count thread blocks
which were run on multiprocessors in TPC 0.
The counter value is set to zero in the following cases:
The number of blocks launched on the multiprocessor(s) being profiled is zero. This
can happen when the number of blocks launched for a kernel is less than the total
number of multiprocessors on a compute device.
The counter value is less than the number of blocks launched on the
multiprocessor(s) being profiled. The normalized fractional value less than one is
truncated to zero.
If any counter value is set to zero a warning is displayed at the end of the application
profiling.
more number of application runs are required to collect all counter values as
compared to when the option is disabled.
the "cta_launched" and "sm_cta_launched" columns are not shown in the
profiler table.
PROFILER COUNTERS
Table 6 lists the profiler counters supported for different multiprocessor configurations
and compute capabilities.
TPC=Texture N= No
Processing Cluster
FB: Frame Buffer
(GPU DRAM or
Device Memory) 1.0 1.1 1.2 1.3 2.0 2.1
SW= Counter
Counter Description values
branch Number of branches taken by threads executing
a kernel. This counter is incremented by one if
at least one thread in a warp takes the branch. SM Y Y Y Y Y Y
Note that barrier instructions (__syncThreads())
also get counted as branches.
divergent branch Number of divergent branches within a warp.
This counter is incremented by one if at least
one thread in a warp diverges (that is, follows a
SM Y Y Y Y Y Y
different execution path) via a data dependent
conditional branch. The counter is incremented
by one at each point of divergence in a warp.
instructions Number of instructions executed. SM Y Y Y Y N N
warp serialize If two addresses of a memory request fall in the
same memory bank, there is a bank conflict and
the access has to be serialized. This counter
SM Y Y Y Y N N
gives the number of thread warps that serialize
on address conflicts to either shared or constant
memory.
sm cta launched Number of threads blocks launched on a
SM Y Y Y Y Y Y
multiprocessor.
gld uncoalesced Number of non-coalesced global memory loads. TPC Y Y N N N N
gld coalesced Number of coalesced global memory loads. TPC Y Y N N N N
TPC=Texture N= No
Processing Cluster
FB: Frame Buffer
(GPU DRAM or
Device Memory) 1.0 1.1 1.2 1.3 2.0 2.1
SW= Counter
Counter Description values
gld request Number of global memory load requests. On
devices with compute capability 1.3 enabling
this counter will result in increased counts for
TPC N N Y Y Y Y
the "instructions" and "branch" counter values if
they are also enabled in the same application
run.
gld 32 byte Number of 32 byte global memory load
transactions; incremented by 1 for each 32 byte TPC N N Y Y N N
transaction.
gld 64 byte Number of 64 byte global memory load
transactions; incremented by 1 for each 64 byte TPC N N Y Y N N
transaction.
gld 128 byte Number of 128 byte global memory load
transactions; incremented by 1 for each 128 TPC N N Y Y N N
byte transaction.
gst coalesced Number of coalesced global memory stores. TPC Y Y N N N N
gst request Number of global memory store requests. On
devices with compute capability 1.3 enabling
this counter will result in increased counts for
TPC N N Y Y Y Y
the "instructions" and "branch" counter values if
they are also enabled in the same application
run.
gst 32 byte Number of 32 byte global memory store
transactions; incremented by 2 for each 32 byte TPC N N Y Y N N
transaction.
gst 64 byte Number of 64 byte global memory store
transactions; incremented by 4 for each 64 byte TPC N N Y Y N N
transaction.
gst 128 byte Number of 128 byte global memory store
transactions; incremented by 8 for each 128 TPC N N Y Y N N
byte transaction.
local load Number of local memory load transactions. Each
local load request will generate one transaction TPC Y Y Y Y Y Y
irrespective of the size of the transaction.
local store Number of local memory store transactions;
incremented by 2 for each 32-byte transaction,
by 4 for each 64-byte transaction and by 8 for
each 128-byte transaction for compute devices
TPC Y Y Y Y Y Y
having compute capability 1.x. It is incremented
by 1 irrespective of the size of the transaction
for compute devices having compute capability
2.0.
cta launched Number of threads blocks launched on a TPC. TPC Y Y Y Y N N
texture cache hit Number of texture cache hits. TPC Y Y Y Y N N
texture cache miss Number of texture cache misses. TPC Y Y Y Y N N
TPC=Texture N= No
Processing Cluster
FB: Frame Buffer
(GPU DRAM or
Device Memory) 1.0 1.1 1.2 1.3 2.0 2.1
SW= Counter
Counter Description values
prof triggers There are 8 such triggers that user can profile.
Those are generic and can be inserted in any
TPC Y Y Y Y Y Y
place of the code to collect the related
information.
shared load Number of executed shared load instructions
SM N N N N Y Y
per warp on a multiprocessor.
shared store Number of executed shared store instructions
SM N N N N Y Y
per warp on a multiprocessor.
instructions issued Number of instructions issued including replays. SM N N N N Y Y
instructions Number of instructions executed, do not include
SM N N N N Y Y
executed replays.
threads instruction Number of instructions executed by all threads.
executed This does not include replays. For each
instruction it increments by the number of SM N N N N Y Y
threads in the warp that execute the
instruction.
warps launched Number of warps launched on a multiprocessor. SM N N N N Y Y
threads launched Number of threads launched on a
SM N N N N Y Y
multiprocessor.
active cycles Number of cycles a multiprocessor has at least
SM N N N N Y Y
one active warp.
active warps Accumulated number of active warps per cycle.
For every cycle it increments by the number of
SM N N N N Y Y
active warps in the cycle which can be in the
range 0 to 48.
l1 global load hit Number of global load hits in L1 cache. SM N N N N Y Y
l1 global load miss Number of global load misses in L1 cache. SM N N N N Y Y
l1 local load hit Number of local load hits in L1 cache. SM N N N N Y Y
l1 local load miss Number of local load misses in L1 cache SM N N N N Y Y
l1 local store hit Number of local store hits in L1 cache. SM N N N N Y Y
l1 local store miss Number of local store misses in L1 cache. SM N N N N Y Y
l1 shared bank Number of shared bank conflicts.
SM N N N N Y Y
conflicts
uncached global Number of uncached global load transactions;
load transaction incremented by 1 per transaction. Transaction SM N N N N Y Y
size can be 32/64/128 bytes.
global store Number of global store transactions;
transaction incremented by 1 per transaction. Transaction SM N N N N Y Y
size can be 32/64/128 bytes.
l2 read requests Number of read requests from L1 to L2 cache;
FB N N N N Y Y
incremented by 1 for each 32-byte access.
TPC=Texture N= No
Processing Cluster
FB: Frame Buffer
(GPU DRAM or
Device Memory) 1.0 1.1 1.2 1.3 2.0 2.1
SW= Counter
Counter Description values
l2 read texture Number of read requests from texture cache to
requests L2 cache; incremented by 1 for each 32-byte FB N N N N Y Y
access.
l2 write requests Number of write requests from L1 to L2 cache;
FB N N N N Y Y
incremented by 1 for each 32-byte access.
l2 read misses Number of read misses in L2 cache; incremented
FB N N N N Y Y
by 1 for each 32-byte access.
l2 write misses Number of write misses in L2 cache;
FB N N N N Y Y
incremented by 1 for each 32-byte access.
dram reads Number of read requests to DRAM; incremented
FB N N N N Y Y
by 1 for each 32-byte access.
dram writes Number of write requests to DRAM; incremented
FB N N N N Y Y
by 1 for each 32-byte access.
tex cache requests Number of texture cache requests; incremented
SM N N N N Y Y
by 1 for each 32-byte access.
tex cache misses Number of texture cache misses; incremented
SM N N N N Y Y
by 1 for each 32-byte access.
gld instruction 8bit Total number of 8-bit global load instructions
that are executed by all the threads across all SW N N N N Y Y
thread blocks.
gld instruction Total number of 16-bit global load instructions
16bit that are executed by all the threads across all SW N N N N Y Y
thread blocks.
gld instruction Total number of 32-bit global load instructions
32bit that are executed by all the threads across all SW N N N N Y Y
thread blocks.
gld instruction Total number of 64-bit global load instructions
64bit that are executed by all the threads across all SW N N N N Y Y
thread blocks.
gld instruction Total number of 128-bit global load instructions
128bit that are executed by all the threads across all SW N N N N Y Y
thread blocks.
gst instruction 8bit Total number of 8-bit global store instructions
that are executed by all the threads across all SW N N N N Y Y
thread blocks.
gst instruction Total number of 16-bit global store instructions
16bit that are executed by all the threads across all SW N N N N Y Y
thread blocks.
gst instruction Total number of 32-bit global store instructions
32bit that are executed by all the threads across all SW N N N N Y Y
thread blocks.
gst instruction Total number of 64-bit global store instructions
64bit that are executed by all the threads across all SW N N N N Y Y
thread blocks.
TPC=Texture N= No
Processing Cluster
FB: Frame Buffer
(GPU DRAM or
Device Memory) 1.0 1.1 1.2 1.3 2.0 2.1
SW= Counter
Counter Description values
gst instruction Total number of 128-bit global store instructions
128bit that are executed by all the threads across all SW N N N N Y Y
thread blocks.
Note: The derived statistics displayed in the Summary Table as well as in the
Analysis window of the Kernel Analysis feature for a particular kernel are the
average values taken over all the invocations of that kernel.
Compute Capability
Derived Statistic Description
1.0 1.1 1.2 1.3 2.0 2.1
glob mem read throughput Global memory read throughput in giga-bytes per second. For * * * * * *
compute capability < 2.0 this is calculated as (((gld_32*32) +
(gld_64*64) + (gld_128*128)) * TPC) / (gputime * 1000) For
compute capability >= 2.0 this is calculated as ((DRAM reads) *
32) / (gputime * 1000)
Compute Capability
Derived Statistic Description
1.0 1.1 1.2 1.3 2.0 2.1
glob mem write throughput Global memory write throughput in giga-bytes per second. For * * * * * *
compute capability < 2.0 this is calculated as (((gst_32*32) +
(gst_64*64) + (gst_128*128)) * TPC) / (gputime * 1000) For
compute capability >= 2.0 this is calculated as ((DRAM writes)
* 32) / (gputime * 1000)
glob mem overall throughput Global memory overall throughput in giga-bytes per second. * * * * * *
This is calculated as Global memory read throughput + Global
memory write throughput
instruction throughput This is the ratio of achieved instruction rate to peak single 0-1 0-1 0-1 0-1 NA NA
issue instruction rate. The achieved instruction rate is
calculated using the profiler counter “instructions”. The peak
instruction rate is calculated based on the GPU clock speed. In
the case of instruction dual-issue coming into play, this ratio
shoots up to greater than 1. This is calculated as (instructions)
/ (gpu_time * clock_frequency)
active warps/active cycles The average number of warps that are active on a NA NA NA NA 0- 0-
multiprocessor per cycle. This is calculated as (active warps) / 48 48
(active cycles).
l1 gld hit rate This is calculated as 100 * (l1 global load hit count) / ((l1 NA NA NA NA 0- 0-
global load hit count) + (l1 global load miss count)) 100 100
Ideal Instruction/Byte ratio This is a ratio of the peak instruction throughput and the peak
memory throughput of the CUDA device. This is a property of NA NA NA NA * *
the device and is independent of the kernel.
Compute Capability
Derived Statistic Description
1.0 1.1 1.2 1.3 2.0 2.1
This is the ratio of the total number of instructions issued by
the kernel and the total number of bytes accessed by the
kernel from global memory. If this ratio is greater than the
instruction/byte Ideal instruction/byte ratio, then the kernel is compute bound
and if it‟s less, then the kernel is memory bound. This is NA NA NA NA * *
calculated as
(32 * instructions issued * #SM)/ {32 * (l2 read requests + l2
write requests + l2 read texture requests)}
Compute Capability
Derived Statistic Description
1.0 1.1 1.2 1.3 2.0 2.1
Percentage of hits that occur in texture cache while accessing
data from texture memory. This statistic will be zero when
texture memory is not used. This is calculated as 0- 0-
Texture cache hit rate (%) NA NA NA NA
100 100
100 * (tex cache requests – tex cache misses)/tex cache
requests
Compute Capability
Derived Statistic Description
1.0 1.1 1.2 1.3 2.0 2.1
This shows the percentage of excess data that is accessed
while making global memory store transactions. Ideally 0%
excess stores will be achieved when kernel requested global
memory write throughput is equal to the L2 cache write
throughput i.e. the number of bytes requested by the kernel
in terms of stores are equal to the number of bytes actually
Global memory excess store accessed by the hardware during kernel execution to service 0- 0-
NA NA NA NA
(%) the kernel. If this statistic is high, it implies that the access 100 100
pattern for store is not coalesced, many extra bytes are
getting accessed while execution of the threads of the kernel.
This is calculated as
100 - (100 * kernel requested global memory write throughput
/ l2 write throughput)
Compute Capability
Derived Statistic Description
1.0 1.1 1.2 1.3 2.0 2.1
Percentage of replayed instructions caused due to shared
Shared bank conflict replay memory bank conflicts. This is calculated as 0- 0-
NA NA NA NA
(%) 100 100
100 * (l1 shared conflict)/ instructions issued
HDMI
HDMI, the HDMI logo, and High-Definition Multimedia Interface are trademarks or registered trademarks of
HDMI Licensing LLC.
OpenCL
OpenCL is a trademark of Apple Inc. used under license to the Khronos Group Inc.
Trademarks
NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation in the U.S. and
other countries. Other company and product names may be trademarks of the respective companies with
which they are associated.
Copyright
© 2010 NVIDIA Corporation. All rights reserved.
[Link]