The CUDA Profiling Tools Interface (CUPTI)

The CUDA Profiling Tools Interface (CUPTI) enables the creation of profiling and tracing tools that target CUDA applications. CUPTI provides four APIs: the Activity API, the Callback API, the Event API, and the Metric 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.

  • The CUPTI Activity API allows you to asychronously collect a trace of an application’s CPU and GPU CUDA activity.
  • The CUPTI Callback API allows you to register a callback into your own code. Your callback will be invoked when the application being profiled calls a CUDA runtime or driver function, or when certain events occur in the CUDA driver.
  • The CUPTI Event API allows you to query, configure, start, stop, and read the event counters on a CUDA-enabled device.
  • The CUPTI Metric API allows you to collect application metrics calculated from one or more event values.

The CUPTI Event API is the most interesting part regarding the goal of my GSoC project. That API can determine the available events on a device. An event is just a various activity like the number of instructions executed, the number of threads launched on a device, and so on… An avent has also an ID, a short/long description, a category (memory, instructions…) and a domain. For example, on my NVC1, I have 85 events available.

A device exposes one or more event domains. Each event domain represents a group of related events available on that device. A device may have multiple instances of a domain, indicating that the device can simultaneously record multiple instances of each event within that domain.

In order to retrieve the profiling information, CUPTI through the blob uses ioctl calls for reading/writing registers.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s