Add support for Sysman init and sysman driver init

With this change we are adding support for initializing
Sysman and also providing support to get Sysman driver
handles and device handles.

Related-To: LOCI-3950

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2023-01-31 17:00:21 +00:00
committed by Compute-Runtime-Automation
parent 2aaebddb37
commit 0bc4294af4
19 changed files with 863 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -18,6 +18,7 @@
#include <vector>
namespace L0 {
bool sysmanInitFromCore = false;
void DeviceImp::createSysmanHandle(bool isSubDevice) {
if (static_cast<DriverHandleImp *>(driverHandle)->enableSysman && !isSubDevice) {
@@ -35,6 +36,8 @@ SysmanDevice *SysmanDeviceHandleContext::init(ze_device_handle_t coreDevice) {
delete sysmanDevice;
sysmanDevice = nullptr;
}
sysmanInitFromCore = true;
L0::DeviceImp *device = static_cast<DeviceImp *>(Device::fromHandle(coreDevice));
for (auto &subDevice : device->subDevices) {
static_cast<DeviceImp *>(subDevice)->setSysmanHandle(sysmanDevice);