CUPTI User's Guide
CUPTI User's Guide
CUPTI User's Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Parameters:device The CUDA devicearraySizeBytes The size of metricArray in bytes, and returns the number of byteswritten to metricArraymetricArray Returns the IDs of the metrics for the deviceReturn values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_DEVICE<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if arraySizeBytes or metricArray areNULLCUptiResult cuptiDeviceGetNumMetrics (CUdevice device, uint32_t∗ numMetrics)Returns the number of metrics available for a device.Parameters:device The CUDA devicenumMetrics Returns the number of metrics available for the deviceReturn values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_DEVICE<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if numMetrics is NULLCUptiResult cuptiEnumMetrics (size_t ∗ arraySizeBytes,CUpti_MetricID ∗ metricArray)Returns the metric IDs in metricArray for all CUDA-capable devices. The size of themetricArray buffer is given by ∗arraySizeBytes. The size of the metricArray buffermust be at least numMetrics ∗ sizeof(CUpti_MetricID) or all metric IDs will not bereturned. The value returned in ∗arraySizeBytes contains the number of bytes returnedin metricArray.Parameters:arraySizeBytes The size of metricArray in bytes, and returns the number of byteswritten to metricArrayCUDA Tools SDK <strong>CUPTI</strong> User’s <strong>Guide</strong> DA-05679-001_v01 | 103