CUPTI User's Guide
CUPTI User's Guide
CUPTI User's Guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_METRIC_ID<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if valueSize or value is NULL, or ifattrib is not a metric attribute<strong>CUPTI</strong>_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-stringattribute values, indicates that the value buffer is too small to hold the attributevalue.CUptiResult cuptiMetricGetIdFromName (CUdevice device, constchar ∗ metricName, CUpti_MetricID ∗ metric)Find a metric by name and return the metric ID in ∗metric.Parameters:device The CUDA devicemetricName The name of metric to findmetric Returns the ID of the found metric or undefined if unable to find the metricReturn values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_DEVICE<strong>CUPTI</strong>_ERROR_INVALID_METRIC_NAME if unable to find a metric with namemetricName. In this case ∗metric is undefined<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if metricName or metric are NULL.CUptiResult cuptiMetricGetNumEvents (CUpti_MetricID metric,uint32_t ∗ numEvents)Returns the number of events in numEvents that are required to calculate a metric.Parameters:metric ID of the metricnumEvents Returns the number of events required for the metricReturn values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_METRIC_ID<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if numEvents is NULLCUDA Tools SDK <strong>CUPTI</strong> User’s <strong>Guide</strong> DA-05679-001_v01 | 106