Get events of a metric in CUPTI


I am looking at the CUPTI metrics and try to make my own metric. There are couples of interessting metrics to me. However, they are not enough. I am trying to extract events from the metrics. But I do not know which API should I employ. By the way it seems to me that “nvprof --query-events” lists less events than the hardware supports. For instance, I cannot image which events are employed for the metric “stall_memory_dependency”


Hi Bo,

You can use the API cuptiMetricGetNumEvents to get the number of events required for the metric, and API cuptiMetricEnumEvents to get the event-ids. CUPTI sample callback_metric shows how to use these APIs.

Hi Mjain,

thanks. I got the events IDs. However, I cannot get the event name using the cuptiEventGetAttribute(, CUPTI_EVENT_ATTR_NAME, ,), for the events of “stall_memory_dependency”.

Otherwise, I checked the IDs agaist available events given by “samples/cupti_query”, all the 20 events for “stall_memory_dependency” are not listed there.

There must be some secret events not published or documented.

BTW, how is the metric “stall_memory_dependency” caculated? Is there any documentation describing it.