mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Introduce new interface for reinitializing level zero device
This change introduce - new method deviceReinit, which could be used, to reinitialize existing level zero device. Related-To: LOCI-2612 Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
afaef2b234
commit
cfad41f28a
@@ -16,6 +16,15 @@
|
||||
|
||||
namespace L0 {
|
||||
|
||||
void DeviceImp::createSysmanHandle(bool isSubDevice) {
|
||||
if (static_cast<DriverHandleImp *>(driverHandle)->enableSysman && !isSubDevice) {
|
||||
if (this->getSysmanHandle() == nullptr) {
|
||||
// Sysman handles are created only during zeInit time device creation. And destroyed during L0::device destroy.
|
||||
this->setSysmanHandle(L0::SysmanDeviceHandleContext::init(this->toHandle()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SysmanDevice *SysmanDeviceHandleContext::init(ze_device_handle_t coreDevice) {
|
||||
SysmanDeviceImp *sysmanDevice = new SysmanDeviceImp(coreDevice);
|
||||
DEBUG_BREAK_IF(!sysmanDevice);
|
||||
|
||||
Reference in New Issue
Block a user