mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Fixed Global Driver to be void * with library unload driver cleanup
- Changed Global Driver to be a void * to avoid auto add of Global Driver Destructor to run before destruction of other L0 data structures that might be enqueued to destory in static object destructors. - Added register of library unload driverdestructor to cleanup driver/device as the last destructor run. Change-Id: I8ba6c5c27424b942a86a2613edd52fc682ab1c64 Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
a9c2840770
commit
e1d9f92b94
@@ -169,7 +169,7 @@ void MetricContext::enableMetricApi(ze_result_t &result) {
|
||||
return;
|
||||
}
|
||||
|
||||
DriverHandle *driverHandle = L0::DriverHandle::fromHandle(GlobalDriver.get());
|
||||
DriverHandle *driverHandle = L0::DriverHandle::fromHandle(GlobalDriverHandle);
|
||||
|
||||
uint32_t count = 0;
|
||||
result = driverHandle->getDevice(&count, nullptr);
|
||||
|
||||
@@ -24,7 +24,7 @@ void SysmanHandleContext::init(ze_init_flag_t flag) {
|
||||
}
|
||||
|
||||
SysmanHandleContext::SysmanHandleContext() {
|
||||
DriverHandle *dH = L0::DriverHandle::fromHandle(GlobalDriver.get());
|
||||
DriverHandle *dH = L0::DriverHandle::fromHandle(GlobalDriverHandle);
|
||||
uint32_t count = 0;
|
||||
dH->getDevice(&count, nullptr);
|
||||
std::vector<ze_device_handle_t> devices(count);
|
||||
|
||||
Reference in New Issue
Block a user