mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 08:37:12 +08:00
feature: zetIntelMetricSupportedScopesGetExp should expect metric handle
Related-To: NEO-16765 Signed-off-by: Shreyas Kunder <shreyas.kunder@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d3b0856e72
commit
b89897e311
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user