mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
feature: support creating multiple metric groups from metrics
This replaces the existing single metric group creation api Related-To: NEO-11186 Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
94d360c62c
commit
edd675b008
@@ -147,9 +147,11 @@ struct MetricImp : public Metric {
|
||||
}
|
||||
~MetricImp() override = default;
|
||||
MetricImp(MetricSource &metricSource) : metricSource(metricSource) {}
|
||||
bool isImmutable() { return isPredefined; }
|
||||
|
||||
protected:
|
||||
MetricSource &metricSource;
|
||||
bool isPredefined = true;
|
||||
};
|
||||
|
||||
struct MetricGroup : _zet_metric_group_handle_t {
|
||||
|
||||
@@ -239,16 +239,12 @@ struct OaMetricImp : public MetricImp {
|
||||
|
||||
static Metric *create(MetricSource &metricSource, zet_metric_properties_t &properties);
|
||||
|
||||
bool isImmutable() { return isPredefined; }
|
||||
|
||||
protected:
|
||||
void copyProperties(const zet_metric_properties_t &source,
|
||||
zet_metric_properties_t &destination);
|
||||
|
||||
zet_metric_properties_t properties{
|
||||
ZET_STRUCTURE_TYPE_METRIC_PROPERTIES};
|
||||
|
||||
bool isPredefined{};
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
@@ -117,6 +117,10 @@ class MockMetric : public L0::MetricImp {
|
||||
ze_result_t destroy() override {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
|
||||
void setPredefined(bool status) {
|
||||
isPredefined = status;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ult
|
||||
|
||||
Reference in New Issue
Block a user