NVIDIA CUDA Profiling Tools Interface (CUPTI) - CUDA Toolkit
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,
- the Profiler API,
- the PC Sampling API,
- the SASS Metric API, and
- the Checkpoint 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, NVIDIA occasionally uses this page to provide CUPTI improvements and bug fixes between toolkit releases.
Revision History
Key Features
- Trace CUDA API by registering callbacks for API calls of interest
- Full support for entry and exit points in the CUDA C Runtime (CUDART) and CUDA Driver
- GPU workload trace for the activities happening on the GPU, which includes kernel executions, memory operations (e.g., Host-to-Device memory copies) and memset operations.
- CUDA Unified Memory trace for transfers from host to device, device to host, device to device and page faults on CPU and GPU etc.
- Normalized timestamps for CPU and GPU trace
- Profile hardware and software event counters, including:
- Utilization metrics for various hardware units
- 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
- Range profiling to enable metric collection over concurrent kernel launches within a range
- Metrics attribution at the high-level source code and the executed assembly instructions.
- Device-wide sampling of the program counter (PC). The PC Sampling gives the number of samples for each source and assembly line with various stall reasons.
Updates in CUDA Toolkit 12.6 Update 1
- Disabling all callbacks in a domain using the
cuptiEnableDomain
API could unintentionally disable other activities and callbacks. This issue has been addressed and resolved. - Fixed issues with Enhanced compatibility (aka minor version compatibility) of a few CUPTI activities with the driver versions shipped with the CUDA 12.2 or prior releases.
Resolved Issues
Updates in CUDA Toolkit 12.6
- CUPTI introduces PM Sampling APIs for collecting many hardware metrics by sampling the GPU's performance monitors (PM) periodically at fixed intervals for a CUDA workload.
These APIs are provided in the header file
cupti_pmsampling.h
. These are supported on Turing and later GPU architectures, i.e. devices with compute capability 7.5 and higher. Refer to the section PM Sampling API for more details. - The Profiling is split into four main phases - Enumeration, Configuration, Collection and Evaluation. APIs for three phases enumeration, configuration and evaluation are provided directly by the low level Perfworks APIs. CUPTI is adding a new set of APIs around these Perfworks host APIs to simplify usage, shield users from low-level concepts, and ease adaptation to changes in Perfworks APIs. These APIs promote consistency, reduce confusion, and enhance integration with CUPTI APIs. New host APIs are provided in the header
cupti_profiler_host.h
. Additionally, new target APIs will be introduced in a future release to simplify profiling for new users and align the call structure with other profiling APIs for faster learning and better adaptability. - Added support for identifying the source of the memory allocation. This is useful when memory allocation request is made from a library or shared object which is called from the application. A new field
source
is added in the memory activity record. The activity recordCUpti_ActivityMemory3
is deprecated and it is replaced by a new activity recordCUpti_ActivityMemory4
. Refer to the section Device Memory Allocation Source Tracking for more details. - Added a new overhead kind
CUPTI_ACTIVITY_OVERHEAD_ACTIVITY_BUFFER_REQUEST
to report the overhead incurred while requesting activity buffers from the CUPTI client. - Added static library
libcupti_static.a
for ARM Server (arm64 SBSA). - Source/SASS level metrics from the header
cupti_activity.h
are deprecated on Volta and later GPU architectures and these will be removed in a future release. It includes metricsCUPTI_ACTIVITY_KIND_GLOBAL_ACCESS
,CUPTI_ACTIVITY_KIND_SHARED_ACCESS
,CUPTI_ACTIVITY_KIND_BRANCH
andCUPTI_ACTIVITY_KIND_INSTRUCTION_EXECUTION
and related correlation kindsCUPTI_ACTIVITY_KIND_SOURCE_LOCATOR
andCUPTI_ACTIVITY_KIND_INSTRUCTION_CORRELATION
. It is recommended to move to the SASS Metric API from the headercupti_sass_metrics.h
which is supported on Volta and later GPU architectures. - Exported the profiling API
cuptiProfilerIsPassCollected
. - Reduced the collection overhead for memcpy tracing.
- For some activities, duration for the activity buffer request was getting included in the activity duration. This issue is resolved.
New Features
Deprecated and dropped features
Resolved Issues
Requirements
- Linux x86_64[1]
- Windows x86_64[1]
- Linux aarch64 SBSA[1]
- DRIVE OS QNX aarch64[2]
- DRIVE OS Linux aarch64[2]
- Activity and Callback APIs
- All architectures supported by CUDA Toolkit
- Event and Metric APIs
- Volta
- Pascal
- Maxwell
- Profiling and PC Sampling APIs
- Hopper: GH100
- Ada: AD10x
- Ampere: A100 with Multi-Instance GPU, GA10x
- Turing
- Volta: GV100, GV10B
- CUPTI can be found in the CUDA Toolkit 12.6 Update 1 production release
- 560.94 (Windows)
- 560.35.03 (Linux)
Supported platforms
[2] available in the Embedded or Drive toolkits only
Supported NVIDIA GPU architectures
CUDA Toolkit
Drivers
-
Please use the following drivers
Documentation
Support
To provide feedback, request additional features, or report issues, please use the Developer Forums.
Installation Overview
When installing CUDA Toolkit 12.6 Update 1 and specifying options, be sure to select CUDA > Development > Tools > CUPTI.