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
@@ -647,8 +647,10 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, uint3
|
||||
device->getSourceLevelDebugger()
|
||||
->notifyNewDevice(osInterface ? osInterface->getDeviceHandle() : 0);
|
||||
}
|
||||
if (static_cast<DriverHandleImp *>(driverHandle)->enableSysman) {
|
||||
device->setSysmanHandle(L0::SysmanDeviceHandleContext::init(device->toHandle()));
|
||||
}
|
||||
|
||||
device->setSysmanHandle(L0::SysmanDeviceHandleContext::init(device->toHandle()));
|
||||
return device;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ void DriverImp::initialize(ze_result_t *result) {
|
||||
envReader.getSetting("ZET_ENABLE_METRICS", false);
|
||||
envVariables.pin =
|
||||
envReader.getSetting("ZET_ENABLE_PROGRAM_INSTRUMENTATION", false);
|
||||
envVariables.sysman =
|
||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
||||
|
||||
auto executionEnvironment = new NEO::ExecutionEnvironment();
|
||||
UNRECOVERABLE_IF(nullptr == executionEnvironment);
|
||||
|
||||
@@ -253,6 +253,7 @@ DriverHandle *DriverHandle::create(std::vector<std::unique_ptr<NEO::Device>> dev
|
||||
|
||||
driverHandle->affinityMaskString = envVariables.affinityMask;
|
||||
driverHandle->enableProgramDebugging = envVariables.programDebugging;
|
||||
driverHandle->enableSysman = envVariables.sysman;
|
||||
|
||||
ze_result_t res = driverHandle->initialize(std::move(devices));
|
||||
if (res != ZE_RESULT_SUCCESS) {
|
||||
|
||||
@@ -71,6 +71,7 @@ struct DriverHandleImp : public DriverHandle {
|
||||
// Environment Variables
|
||||
std::string affinityMaskString = "";
|
||||
bool enableProgramDebugging = false;
|
||||
bool enableSysman = false;
|
||||
};
|
||||
|
||||
extern struct DriverHandleImp *GlobalDriver;
|
||||
|
||||
@@ -30,6 +30,7 @@ struct L0EnvVariables {
|
||||
bool programDebugging;
|
||||
bool metrics;
|
||||
bool pin;
|
||||
bool sysman;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user