mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
feature: update metrics for v1.11
Related-To: NEO-12597 Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6fd44078f7
commit
f589408848
@@ -261,5 +261,57 @@ zetGetMetricExpProcAddrTable(
|
||||
fillDdiEntry(pDdiTable->pfnCreateFromProgrammableExp, L0::zetMetricCreateFromProgrammableExp, version, ZE_API_VERSION_1_9);
|
||||
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricDestroyExp, version, ZE_API_VERSION_1_9);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ZE_DLLEXPORT ze_result_t ZE_APICALL
|
||||
zetGetMetricTracerExpProcAddrTable(
|
||||
ze_api_version_t version,
|
||||
zet_metric_tracer_exp_dditable_t *pDdiTable) {
|
||||
if (nullptr == pDdiTable)
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
|
||||
fillDdiEntry(pDdiTable->pfnCreateExp, L0::zetMetricTracerCreateExp, version, ZE_API_VERSION_1_11);
|
||||
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricTracerDestroyExp, version, ZE_API_VERSION_1_11);
|
||||
fillDdiEntry(pDdiTable->pfnEnableExp, L0::zetMetricTracerEnableExp, version, ZE_API_VERSION_1_11);
|
||||
fillDdiEntry(pDdiTable->pfnDisableExp, L0::zetMetricTracerDisableExp, version, ZE_API_VERSION_1_11);
|
||||
fillDdiEntry(pDdiTable->pfnReadDataExp, L0::zetMetricTracerReadDataExp, version, ZE_API_VERSION_1_11);
|
||||
fillDdiEntry(pDdiTable->pfnDecodeExp, L0::zetMetricTracerDecodeExp, version, ZE_API_VERSION_1_11);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ZE_DLLEXPORT ze_result_t ZE_APICALL
|
||||
zetGetMetricDecoderExpProcAddrTable(
|
||||
ze_api_version_t version,
|
||||
zet_metric_decoder_exp_dditable_t *pDdiTable) {
|
||||
|
||||
if (nullptr == pDdiTable)
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
|
||||
fillDdiEntry(pDdiTable->pfnCreateExp, L0::zetMetricDecoderCreateExp, version, ZE_API_VERSION_1_11);
|
||||
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricDecoderDestroyExp, version, ZE_API_VERSION_1_11);
|
||||
fillDdiEntry(pDdiTable->pfnGetDecodableMetricsExp, L0::zetMetricDecoderGetDecodableMetricsExp, version, ZE_API_VERSION_1_11);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ZE_DLLEXPORT ze_result_t ZE_APICALL
|
||||
zetGetDeviceExpProcAddrTable(
|
||||
ze_api_version_t version,
|
||||
zet_device_exp_dditable_t *pDdiTable) {
|
||||
|
||||
if (nullptr == pDdiTable)
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
|
||||
fillDdiEntry(pDdiTable->pfnGetConcurrentMetricGroupsExp, L0::zetDeviceGetConcurrentMetricGroupsExp, version, ZE_API_VERSION_1_11);
|
||||
fillDdiEntry(pDdiTable->pfnCreateMetricGroupsFromMetricsExp, L0::zetDeviceCreateMetricGroupsFromMetricsExp, version, ZE_API_VERSION_1_11);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -266,6 +266,120 @@ zetMetricDestroyExp(
|
||||
return metric->destroy();
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetDeviceGetConcurrentMetricGroupsExp(
|
||||
zet_device_handle_t hDevice,
|
||||
uint32_t metricGroupCount,
|
||||
zet_metric_group_handle_t *phMetricGroups,
|
||||
uint32_t *pMetricGroupsCountPerConcurrentGroup,
|
||||
uint32_t *pConcurrentGroupCount) {
|
||||
|
||||
auto device = Device::fromHandle(toInternalType(hDevice));
|
||||
return static_cast<MetricDeviceContext &>(device->getMetricDeviceContext()).getConcurrentMetricGroups(metricGroupCount, phMetricGroups, pConcurrentGroupCount, pMetricGroupsCountPerConcurrentGroup);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetDeviceCreateMetricGroupsFromMetricsExp(
|
||||
zet_device_handle_t hDevice,
|
||||
uint32_t metricCount,
|
||||
zet_metric_handle_t *phMetrics,
|
||||
const char *pMetricGroupNamePrefix,
|
||||
const char *pDescription,
|
||||
uint32_t *pMetricGroupCount,
|
||||
zet_metric_group_handle_t *phMetricGroups) {
|
||||
|
||||
hDevice = toInternalType(hDevice);
|
||||
auto device = Device::fromHandle(hDevice);
|
||||
return device->getMetricDeviceContext().createMetricGroupsFromMetrics(metricCount, phMetrics, pMetricGroupNamePrefix, pDescription, pMetricGroupCount, phMetricGroups);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricTracerCreateExp(
|
||||
zet_context_handle_t hContext,
|
||||
zet_device_handle_t hDevice,
|
||||
uint32_t metricGroupCount,
|
||||
zet_metric_group_handle_t *phMetricGroups,
|
||||
zet_metric_tracer_exp_desc_t *desc,
|
||||
ze_event_handle_t hNotificationEvent,
|
||||
zet_metric_tracer_exp_handle_t *phMetricTracer) {
|
||||
return L0::metricTracerCreate(hContext, hDevice, metricGroupCount, phMetricGroups, desc, hNotificationEvent, phMetricTracer);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricTracerDestroyExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer) {
|
||||
return L0::metricTracerDestroy(hMetricTracer);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricTracerEnableExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer,
|
||||
ze_bool_t synchronous) {
|
||||
return L0::metricTracerEnable(hMetricTracer, synchronous);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricTracerDisableExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer,
|
||||
ze_bool_t synchronous) {
|
||||
return L0::metricTracerDisable(hMetricTracer, synchronous);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricTracerReadDataExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer,
|
||||
size_t *pRawDataSize,
|
||||
uint8_t *pRawData) {
|
||||
return L0::metricTracerReadData(hMetricTracer, pRawDataSize, pRawData);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricDecoderCreateExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer,
|
||||
zet_metric_decoder_exp_handle_t *phMetricDecoder) {
|
||||
return L0::metricDecoderCreate(hMetricTracer, phMetricDecoder);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricDecoderDestroyExp(
|
||||
zet_metric_decoder_exp_handle_t phMetricDecoder) {
|
||||
return L0::metricDecoderDestroy(phMetricDecoder);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricDecoderGetDecodableMetricsExp(
|
||||
zet_metric_decoder_exp_handle_t hMetricDecoder,
|
||||
uint32_t *pCount,
|
||||
zet_metric_handle_t *phMetrics) {
|
||||
return L0::metricDecoderGetDecodableMetrics(
|
||||
hMetricDecoder,
|
||||
pCount,
|
||||
phMetrics);
|
||||
}
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
zetMetricTracerDecodeExp(
|
||||
zet_metric_decoder_exp_handle_t phMetricDecoder,
|
||||
size_t *pRawDataSize,
|
||||
uint8_t *pRawData,
|
||||
uint32_t metricsCount,
|
||||
zet_metric_handle_t *phMetrics,
|
||||
uint32_t *pSetCount,
|
||||
uint32_t *pMetricEntriesCountPerSet,
|
||||
uint32_t *pMetricEntriesCount,
|
||||
zet_metric_entry_exp_t *pMetricEntries) {
|
||||
return L0::metricTracerDecode(
|
||||
phMetricDecoder,
|
||||
pRawDataSize,
|
||||
pRawData,
|
||||
metricsCount,
|
||||
phMetrics,
|
||||
pSetCount,
|
||||
pMetricEntriesCountPerSet,
|
||||
pMetricEntriesCount,
|
||||
pMetricEntries);
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
extern "C" {
|
||||
@@ -570,4 +684,146 @@ zetMetricDestroyExp(
|
||||
return L0::zetMetricDestroyExp(hMetric);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetDeviceGetConcurrentMetricGroupsExp(
|
||||
zet_device_handle_t hDevice,
|
||||
uint32_t metricGroupCount,
|
||||
zet_metric_group_handle_t *phMetricGroups,
|
||||
uint32_t *pMetricGroupsCountPerConcurrentGroup,
|
||||
uint32_t *pConcurrentGroupCount) {
|
||||
return L0::zetDeviceGetConcurrentMetricGroupsExp(
|
||||
hDevice,
|
||||
metricGroupCount,
|
||||
phMetricGroups,
|
||||
pMetricGroupsCountPerConcurrentGroup,
|
||||
pConcurrentGroupCount);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetDeviceCreateMetricGroupsFromMetricsExp(
|
||||
zet_device_handle_t hDevice,
|
||||
uint32_t metricCount,
|
||||
zet_metric_handle_t *phMetrics,
|
||||
const char *pMetricGroupNamePrefix,
|
||||
const char *pDescription,
|
||||
uint32_t *pMetricGroupCount,
|
||||
zet_metric_group_handle_t *phMetricGroup) {
|
||||
return L0::zetDeviceCreateMetricGroupsFromMetricsExp(
|
||||
hDevice,
|
||||
metricCount,
|
||||
phMetrics,
|
||||
pMetricGroupNamePrefix,
|
||||
pDescription,
|
||||
pMetricGroupCount,
|
||||
phMetricGroup);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricTracerCreateExp(
|
||||
zet_context_handle_t hContext,
|
||||
zet_device_handle_t hDevice,
|
||||
uint32_t metricGroupCount,
|
||||
zet_metric_group_handle_t *phMetricGroups,
|
||||
zet_metric_tracer_exp_desc_t *desc,
|
||||
ze_event_handle_t hNotificationEvent,
|
||||
zet_metric_tracer_exp_handle_t *phMetricTracer) {
|
||||
|
||||
return L0::zetMetricTracerCreateExp(
|
||||
hContext,
|
||||
hDevice,
|
||||
metricGroupCount,
|
||||
phMetricGroups,
|
||||
desc,
|
||||
hNotificationEvent,
|
||||
phMetricTracer);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricTracerDestroyExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer) {
|
||||
return L0::zetMetricTracerDestroyExp(
|
||||
hMetricTracer);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricTracerEnableExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer,
|
||||
ze_bool_t synchronous) {
|
||||
return L0::zetMetricTracerEnableExp(
|
||||
hMetricTracer,
|
||||
synchronous);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricTracerDisableExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer,
|
||||
ze_bool_t synchronous) {
|
||||
return L0::zetMetricTracerDisableExp(
|
||||
hMetricTracer,
|
||||
synchronous);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricTracerReadDataExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer,
|
||||
size_t *pRawDataSize,
|
||||
uint8_t *pRawData) {
|
||||
return L0::zetMetricTracerReadDataExp(
|
||||
hMetricTracer,
|
||||
pRawDataSize,
|
||||
pRawData);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricDecoderCreateExp(
|
||||
zet_metric_tracer_exp_handle_t hMetricTracer,
|
||||
zet_metric_decoder_exp_handle_t *phMetricDecoder) {
|
||||
|
||||
return L0::zetMetricDecoderCreateExp(
|
||||
hMetricTracer,
|
||||
phMetricDecoder);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricDecoderDestroyExp(
|
||||
zet_metric_decoder_exp_handle_t phMetricDecoder) {
|
||||
|
||||
return L0::zetMetricDecoderDestroyExp(
|
||||
phMetricDecoder);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricDecoderGetDecodableMetricsExp(
|
||||
zet_metric_decoder_exp_handle_t hMetricDecoder,
|
||||
uint32_t *pCount,
|
||||
zet_metric_handle_t *phMetrics) {
|
||||
|
||||
return L0::zetMetricDecoderGetDecodableMetricsExp(
|
||||
hMetricDecoder,
|
||||
pCount,
|
||||
phMetrics);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zetMetricTracerDecodeExp(
|
||||
zet_metric_decoder_exp_handle_t phMetricDecoder,
|
||||
size_t *pRawDataSize,
|
||||
uint8_t *pRawData,
|
||||
uint32_t metricsCount,
|
||||
zet_metric_handle_t *phMetrics,
|
||||
uint32_t *pSetCount,
|
||||
uint32_t *pMetricEntriesCountPerSet,
|
||||
uint32_t *pMetricEntriesCount,
|
||||
zet_metric_entry_exp_t *pMetricEntries) {
|
||||
return L0::zetMetricTracerDecodeExp(
|
||||
phMetricDecoder,
|
||||
pRawDataSize,
|
||||
pRawData,
|
||||
metricsCount,
|
||||
phMetrics,
|
||||
pSetCount,
|
||||
pMetricEntriesCountPerSet,
|
||||
pMetricEntriesCount,
|
||||
pMetricEntries);
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user