File size: 2,164 Bytes
501e3f2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #pragma once
#include <cstdint>
#include <string>
#include <vector>
namespace NV {
namespace Metric {
namespace Eval {
struct MetricNameValue
{
std::string metricName;
int numRanges;
// <rangeName , metricValue> pair
std::vector < std::pair<std::string, double> > rangeNameMetricValueMap;
};
/* Function to get aggregate metric values
* @param[in] chipName Chip name for which to get metric values
* @param[in] counterDataImage Counter data image
* @param[in] metricNames List of metrics to read from counter data image
* @param[out] metricNameValueMap Metric name value map
* @param[in] pCounterAvailabilityImage Pointer to counter availability image queried on target device
*/
bool GetMetricGpuValue( std::string chipName,
const std::vector<uint8_t>& counterDataImage,
const std::vector<std::string>& metricNames,
std::vector<MetricNameValue>& metricNameValueMap,
const uint8_t* pCounterAvailabilityImage = NULL);
/* Function to print aggregate metric values
* @param[in] chipName Chip name for which to get metric values
* @param[in] counterDataImage Counter data image
* @param[in] metricNames List of metrics to read from counter data image
* @param[in] pCounterAvailabilityImage Pointer to counter availability image queried on target device
*/
bool PrintMetricValues( std::string chipName,
const std::vector<uint8_t>& counterDataImage,
const std::vector<std::string>& metricNames,
const uint8_t* pCounterAvailabilityImage = NULL);
}
}
} |