mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Metric Api: zetContextActivateMetricGroups update
Change-Id: Ia3f38e8bfc6176063de36685e16e7a4a21f940c7 Signed-off-by: Robert Krzemien <robert.krzemien@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
1c2936dd47
commit
46c7fac0cc
@@ -11,6 +11,7 @@
|
||||
#include <level_zero/ze_api.h>
|
||||
|
||||
#include "third_party/level_zero/ze_api_ext.h"
|
||||
#include "third_party/level_zero/zet_api_ext.h"
|
||||
|
||||
struct _ze_context_handle_t {
|
||||
virtual ~_ze_context_handle_t() = default;
|
||||
@@ -68,6 +69,9 @@ struct Context : _ze_context_handle_t {
|
||||
virtual ze_result_t createCommandListImmediate(ze_device_handle_t hDevice,
|
||||
const ze_command_queue_desc_t *desc,
|
||||
ze_command_list_handle_t *commandList) = 0;
|
||||
virtual ze_result_t activateMetricGroups(zet_device_handle_t hDevice,
|
||||
uint32_t count,
|
||||
zet_metric_group_handle_t *phMetricGroups) = 0;
|
||||
|
||||
static Context *fromHandle(ze_context_handle_t handle) { return static_cast<Context *>(handle); }
|
||||
inline ze_context_handle_t toHandle() { return this; }
|
||||
|
||||
@@ -144,4 +144,10 @@ ze_result_t ContextImp::createCommandListImmediate(ze_device_handle_t hDevice,
|
||||
return L0::Device::fromHandle(hDevice)->createCommandListImmediate(desc, commandList);
|
||||
}
|
||||
|
||||
ze_result_t ContextImp::activateMetricGroups(zet_device_handle_t hDevice,
|
||||
uint32_t count,
|
||||
zet_metric_group_handle_t *phMetricGroups) {
|
||||
return L0::Device::fromHandle(hDevice)->activateMetricGroups(count, phMetricGroups);
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
@@ -62,6 +62,9 @@ struct ContextImp : Context {
|
||||
ze_result_t createCommandListImmediate(ze_device_handle_t hDevice,
|
||||
const ze_command_queue_desc_t *desc,
|
||||
ze_command_list_handle_t *commandList) override;
|
||||
ze_result_t activateMetricGroups(zet_device_handle_t hDevice,
|
||||
uint32_t count,
|
||||
zet_metric_group_handle_t *phMetricGroups) override;
|
||||
|
||||
protected:
|
||||
DriverHandle *driverHandle = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user