mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
Compute-Runtime-Automation
parent
2aaebddb37
commit
0bc4294af4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user