NVIDIA CUDA Profiling Tools Interface (CUPTI) - CUDA Toolkit 11.2
The NVIDIA® CUDA Profiling Tools Interface (CUPTI) is a dynamic library that enables the creation of profiling and tracing tools that target CUDA applications. CUPTI provides a set of APIs targeted at ISVs creating profilers and other performance optimization tools:
- the Activity API,
- the Callback API,
- the Event API,
- the Metric API, and
- the Profiler API
Using these CUPTI APIs, independent software developers can create profiling tools that provide low and deterministic profiling overhead on the target system, while giving insight into the CPU and GPU behavior of CUDA applications. Normally packaged with the CUDA Toolkit, this stand-alone version of CUPTI provides improvements and bug fixes between toolkit releases.
- Trace CUDA API usage by registering callbacks for API calls of interest
- Full support for entry and exit points in the CUDA C Runtime (CUDART) and CUDA Driver
- Sample hardware and software event counters, including:
- Instruction count and throughput
- Memory load/store events and throughput
- Cache hits/misses
- Branches and divergent branches
- Many more
- Enables automated bottleneck identification based on metrics such as instruction throughput, memory throughput, and more
- Normalized timestamps for CPU and GPU events
CUPTI has made the following changes as part of the CUDA Toolkit 11.2 release,
- A new activity kind CUPTI_ACTIVITY_KIND_MEMORY_POOL and activity record CUpti_ActivityMemoryPool are introduced to represent the creation, destruction and trimming of a memory pool. Enum CUpti_ActivityMemoryPoolType lists types of memory pool.
- A new activity kind CUPTI_ACTIVITY_KIND_MEMORY2 and activity record CUpti_ActivityMemory2 are introduced to provide separate records for memory allocation and release operations. This helps in correlation of records of these operations to the corresponding CUDA APIs, which otherwise is not possible using the existing activity record CUpti_ActivityMemory which provides a single record for both the memory operations.
- Added a new pointer field of type CUaccessPolicyWindow in the kernel activity record to provide the access policy window which specifies a contiguous region of global memory and a persistence property in the L2 cache for accesses within that region. To accomodate this change, activity record CUpti_ActivityKernel5 is deprecated and replaced by a new activity record CUpti_ActivityKernel6. This attribute is not collected by default. To control the collection of launch attributes, a new APIcuptiActivityEnableLaunchAttributes is introdcued.
- New attributes:
CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_PRE_ALLOCATE_VALUE and CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_PRE_ALLOCATE_VALUE are added in the activity attribute enum CUpti_ActivityAttribute to set and get the number of device buffers and profiling semaphore pools which are preallocated for the context.
- CUPTI now allocates profiling buffer for concurrent kernel tracing in the pinned host memory in place of device memory. This might help in improving the performance of the tracing run. Memory location can be controlled using the attribute CUPTI_ACTIVITY_ATTR_MEM_ALLOCATION_TYPE_HOST_PINNED of the activity attribute enum CUpti_ActivityAttribute.
- Execution overheads introduced by CUPTI in the tracing path is reduced.
- The compiler generated line information for inlined functions is improved due to which CUPTI can associate inlined functions with the line information of the function call site that has been inlined.
- Removed support for NVLink performance metrics (nvlrx__* and nvltx__*) from the Profiling API due to a potential application hang during data collection. The metrics will be added back in a future CUDA release.
- Linux x86_64
- Windows x86_64
- Linux PowerPC
- Linux aarch64 SBSA
- DRIVE OS QNX aarch64
- DRIVE OS Linux aarch64
- Android aarch64
 available in the Embedded or Drive toolkits only
 does not support Profiling API data collection
Supported NVIDIA GPU architectures
- Activity and Callback APIs
- All architectures supported by CUDA Toolkit
- Event and Metric APIs
- Ampere: A100 with Multi-Instance GPU, GA10x
- Profiling APIs
- Ampere: A100 with Multi-Instance GPU, GA10x
- Volta: GV100
- CUPTI can be found in the CUDA Toolkit 11.2 production release
Please use the following drivers
- 460.89 (Windows)
- 460.27.04 (Linux)
To provide feedback, request additional features, or report issues, please use the Developer Forums.
When installing CUDA Toolkit 11.2 and specifying options, be sure to select CUDA > Development > Tools > CUPTI.