Added support for Power APIs

- Added support for the Power APIs in the new sysman design.
- Added ULTs for the Power APIs in the new sysman design.
- Added change to measure the average power in the black box test for
Power.

Related-To: LOCI-3891

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
This commit is contained in:
Bari, Pratik
2023-03-01 12:51:33 +00:00
committed by Compute-Runtime-Automation
parent 790ef57c3f
commit adbda5906a
31 changed files with 4106 additions and 25 deletions

View File

@@ -11,6 +11,7 @@
#include "level_zero/core/source/device/device.h"
#include "level_zero/sysman/source/fabric_port/fabric_port.h"
#include "level_zero/sysman/source/memory/memory.h"
#include "level_zero/sysman/source/power/power.h"
#include <level_zero/ze_api.h>
#include <level_zero/zes_api.h>
@@ -19,6 +20,12 @@ namespace Sysman {
struct SysmanDevice : _ze_device_handle_t {
static ze_result_t powerGet(zes_device_handle_t hDevice, uint32_t *pCount, zes_pwr_handle_t *phPower);
static ze_result_t powerGetCardDomain(zes_device_handle_t hDevice, zes_pwr_handle_t *phPower);
virtual ze_result_t powerGet(uint32_t *pCount, zes_pwr_handle_t *phPower) = 0;
virtual ze_result_t powerGetCardDomain(zes_pwr_handle_t *phPower) = 0;
static SysmanDevice *fromHandle(zes_device_handle_t handle) { return static_cast<SysmanDevice *>(handle); }
inline zes_device_handle_t toHandle() { return this; }
virtual ~SysmanDevice() = default;