feature: zetIntelMetricSupportedScopesGetExp should expect metric handle

Related-To: NEO-16765

Signed-off-by: Shreyas Kunder <shreyas.kunder@intel.com>
This commit is contained in:
Shreyas Kunder
2025-11-21 08:12:56 +00:00
committed by Compute-Runtime-Automation
parent d3b0856e72
commit b89897e311
5 changed files with 10 additions and 10 deletions

View File

@@ -141,8 +141,8 @@ zetIntelMetricTracerDecodeExp2(
return L0::metricTracerDecode2(phMetricDecoder, rawDataSize, pRawData, metricCount, phMetric, metricScopeCount, phMetricScopes, usedDataSize, pTotalMetricEntriesCount, phMetricEntries);
}
ze_result_t ZE_APICALL zetIntelMetricSupportedScopesGetExp(zet_metric_handle_t *phMetric, uint32_t *pCount, zet_intel_metric_scope_exp_handle_t *phScopes) {
return L0::getMetricSupportedScopes(phMetric, pCount, phScopes);
ze_result_t ZE_APICALL zetIntelMetricSupportedScopesGetExp(zet_metric_handle_t hMetric, uint32_t *pCount, zet_intel_metric_scope_exp_handle_t *phScopes) {
return L0::getMetricSupportedScopes(hMetric, pCount, phScopes);
}
} // namespace L0
@@ -310,8 +310,8 @@ zetIntelMetricTracerDecodeExp2(
phMetricEntries);
}
ze_result_t ZE_APICALL zetIntelMetricSupportedScopesGetExp(zet_metric_handle_t *phMetric, uint32_t *pCount, zet_intel_metric_scope_exp_handle_t *phScopes) {
return L0::getMetricSupportedScopes(phMetric, pCount, phScopes);
ze_result_t ZE_APICALL zetIntelMetricSupportedScopesGetExp(zet_metric_handle_t hMetric, uint32_t *pCount, zet_intel_metric_scope_exp_handle_t *phScopes) {
return L0::getMetricSupportedScopes(hMetric, pCount, phScopes);
}
} // extern "C"

View File

@@ -238,7 +238,7 @@ ze_result_t ZE_APICALL zetIntelMetricScopeGetPropertiesExp(
zet_intel_metric_scope_properties_exp_t *pMetricScopeProperties); ///< [out] pointer to the metric scope properties structure
ze_result_t ZE_APICALL zetIntelMetricSupportedScopesGetExp(
zet_metric_handle_t *phMetric, ///< [in] handle of the metric
zet_metric_handle_t hMetric, ///< [in] handle of the metric
uint32_t *pCount, ///< [in,out] pointer to the number of metric scopes available for the metric.
///< If set to zero, then the driver shall update the value with the total
///< number of metric scopes available for the metric.

View File

@@ -1225,11 +1225,11 @@ ze_result_t metricAppendMarker(zet_command_list_handle_t hCommandList, zet_metri
}
ze_result_t getMetricSupportedScopes(
zet_metric_handle_t *phMetric,
zet_metric_handle_t hMetric,
uint32_t *pScopesCount,
zet_intel_metric_scope_exp_handle_t *phMetricScopes) {
auto metricImp = static_cast<MetricImp *>(Metric::fromHandle(*phMetric));
auto metricImp = static_cast<MetricImp *>(Metric::fromHandle(hMetric));
return metricImp->getScopes(pScopesCount, phMetricScopes);
}

View File

@@ -651,6 +651,6 @@ ze_result_t metricScopesGet(zet_context_handle_t hContext, zet_device_handle_t h
zet_intel_metric_scope_exp_handle_t *phMetricScopes);
ze_result_t metricScopeGetProperties(zet_intel_metric_scope_exp_handle_t hMetricScope, zet_intel_metric_scope_properties_exp_t *pMetricScopeProperties);
ze_result_t metricAppendMarker(zet_command_list_handle_t hCommandList, zet_metric_group_handle_t hMetricGroup, uint32_t value);
ze_result_t getMetricSupportedScopes(zet_metric_handle_t *phMetric, uint32_t *pScopesCount, zet_intel_metric_scope_exp_handle_t *phMetricScopes);
ze_result_t getMetricSupportedScopes(zet_metric_handle_t hMetric, uint32_t *pScopesCount, zet_intel_metric_scope_exp_handle_t *phMetricScopes);
} // namespace L0

View File

@@ -598,10 +598,10 @@ HWTEST2_F(MetricIpSamplingCalcOpMultiDevTest, givenMetricWhenGettingSupportedMet
EXPECT_EQ(zetMetricGet(metricGroupHandlePerDevice[device], &metricCount, hMetrics.data()), ZE_RESULT_SUCCESS);
for (auto &metric : hMetrics) {
uint32_t metricScopesCount = 0;
EXPECT_EQ(zetIntelMetricSupportedScopesGetExp(&metric, &metricScopesCount, nullptr), ZE_RESULT_SUCCESS);
EXPECT_EQ(zetIntelMetricSupportedScopesGetExp(metric, &metricScopesCount, nullptr), ZE_RESULT_SUCCESS);
EXPECT_EQ(metricScopesCount, expectedScopesCount);
std::vector<zet_intel_metric_scope_exp_handle_t> metricScopesHandle(metricScopesCount);
EXPECT_EQ(zetIntelMetricSupportedScopesGetExp(&metric, &metricScopesCount, metricScopesHandle.data()), ZE_RESULT_SUCCESS);
EXPECT_EQ(zetIntelMetricSupportedScopesGetExp(metric, &metricScopesCount, metricScopesHandle.data()), ZE_RESULT_SUCCESS);
EXPECT_EQ(metricScopesCount, expectedScopesCount);
for (auto &scopeHandle : metricScopesHandle) {