NVIDIA PerfKit


NVIDIA® PerfKit is a software library that provides access to OpenGL driver and GPU hardware performance counters.

NVIDIA PerfKit gives you access to low-level performance counters inside the driver, and hardware counters inside the GPU itself. The counters can be used to determine exactly how your application is using the GPU, identify performance issues, and confirm that performance problems have been resolved.

Target Setup

Copy the PerfKit-<version>.tar.gz tarball (part of the SDK/PDK delivery) on your target and extract it:

# tar zxf PerfKit-<version>.tar.gz

Before launching any application that uses PerfKit, set the following environment variables:

# export __GL_PERFMON_MODE=1 
# export LD_LIBRARY_PATH=<path to>/PerfKit/lib/a64/:$LD_LIBRARY_PATH

NvPmApiQuery Application

You can use the NvPmApiQuery application, which enumerates the available OpenGL and CUDA performance counters for the target GPU.

On the target, go to the PerfKit directory and set the below environment variables:

# cd <path to>/PerfKit/bin/a64 
# export __GL_PERFMON_MODE=1 
# export LD_LIBRARY_PATH=<path to>/PerfKit/lib/a64/:$LD_LIBRARY_PATH

For OpenGL, execute:

# ./NvPmApiQuery --gl

For CUDA, execute:

# ./NvPmApiQuery --cuda 0 

To learn more about NVIDIA PerfKit

For more information on using NVIDIA PerfKit, please see the user guide here: 

https://developer.nvidia.com/sites/default/files/akamai/tools/files/PerfKit_4_5_User_Guide.pdf


NVIDIA® GameWorks™ Documentation Rev. 1.0.200605 ©2014-2020. NVIDIA Corporation. All Rights Reserved.