mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Cleanup Sysman initialization
Change-Id: Idc1e13e1b1fd3928674d5f199665054dbab27a9b Signed-off-by: Matias A. Cabral <matias.a.cabral@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
766011ba87
commit
237e2fe61f
@@ -16,23 +16,15 @@
|
||||
|
||||
namespace L0 {
|
||||
|
||||
SysmanDevice *SysmanDeviceHandleContext::init(ze_device_handle_t device) {
|
||||
auto isSysmanEnabled = getenv("ZES_ENABLE_SYSMAN");
|
||||
if ((isSysmanEnabled == nullptr) || (device == nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
auto isSysmanEnabledAsInt = atoi(isSysmanEnabled);
|
||||
if (isSysmanEnabledAsInt == 1) {
|
||||
SysmanDeviceImp *sysman = new SysmanDeviceImp(device);
|
||||
UNRECOVERABLE_IF(!sysman);
|
||||
sysman->init();
|
||||
return sysman;
|
||||
}
|
||||
return nullptr;
|
||||
SysmanDevice *SysmanDeviceHandleContext::init(ze_device_handle_t coreDevice) {
|
||||
SysmanDeviceImp *sysmanDevice = new SysmanDeviceImp(coreDevice);
|
||||
UNRECOVERABLE_IF(!sysmanDevice);
|
||||
sysmanDevice->init();
|
||||
return sysmanDevice;
|
||||
}
|
||||
|
||||
void DeviceImp::setSysmanHandle(SysmanDevice *pSysman) {
|
||||
pSysmanDevice = pSysman;
|
||||
void DeviceImp::setSysmanHandle(SysmanDevice *pSysmanDev) {
|
||||
pSysmanDevice = pSysmanDev;
|
||||
}
|
||||
|
||||
SysmanDevice *DeviceImp::getSysmanHandle() {
|
||||
|
||||
Reference in New Issue
Block a user