-->

Overview

The CUDA Profiling Tools Interface (CUPTI) enables the creation of profiling and tracing tools that target CUDA applications. CUPTI provides the following APIs: the Activity API, the Callback API, the Event API, the Metric API, the Profiling API, the PC Sampling API and the Checkpoint API. Using these APIs, you can develop profiling tools that give insight into the CPU and GPU behavior of CUDA applications. CUPTI is delivered as a dynamic library on all platforms supported by CUDA.

In this CUPTI document, Tracing refers to the collection of timestamps and additional information for CUDA activities such as CUDA APIs, kernel launches and memory copies during the execution of a CUDA application. Tracing helps in identifying performance issues for the CUDA code by telling you which parts of a program require the most time. Tracing information can be collected using the Activity and Callback APIs.

In this CUPTI document, Profiling refers to the collection of GPU performance metrics for a single kernel or a set of kernels in isolation. Profiling might involve multiple replays of the kernel/s or the entire application to collect GPU performance metrics. For Volta and earlier GPU architectures, these metrics can be collected using CUPTI Event and Metric APIs. For Volta and later GPU architectures, the low overhead CUPTI Profiling and Perfworks Metric APIs replace this functionality, and a new CUPTI PC Sampling API is supported.

Table 1. Description of CUPTI APIs
CUPTI API Feature Description
Activity Asynchronously record CUDA activities, e.g. CUDA API, Kernel, memory copy
Callback CUDA event callback mechanism to notify subscriber that a specific CUDA event executed e.g. "Entering CUDA runtime memory copy"
Event Collect kernel performance counters for a kernel execution
Metric Collect kernel performance metrics for a kernel execution
Profiling Collect performance metrics for a range of execution
PC Sampling Collect continuous mode PC Sampling data without serializing kernel execution
Checkpoint Provides support for automatically saving and restoring the functional state of the CUDA device