mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: ignore ZET_ENABLE_PROGRAM_DEBUGGING when system misconfigured
- if debug not enabled in the system, ignore env var for enabling debugging Resolves: NEO-10370 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f56babb2a9
commit
d9b662a735
@@ -231,6 +231,13 @@ ze_result_t DriverHandleImp::initialize(std::vector<std::unique_ptr<NEO::Device>
|
||||
|
||||
const auto rootDeviceIndex = neoDevice->getRootDeviceIndex();
|
||||
|
||||
auto osInterface = neoDevice->getRootDeviceEnvironment().osInterface.get();
|
||||
if (osInterface && !osInterface->isDebugAttachAvailable() && enableProgramDebugging != NEO::DebuggingMode::disabled) {
|
||||
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr,
|
||||
"Debug mode is not enabled in the system.\n");
|
||||
enableProgramDebugging = NEO::DebuggingMode::disabled;
|
||||
}
|
||||
|
||||
enableRootDeviceDebugger(neoDevice);
|
||||
|
||||
this->rootDeviceIndices.pushUnique(rootDeviceIndex);
|
||||
@@ -242,13 +249,6 @@ ze_result_t DriverHandleImp::initialize(std::vector<std::unique_ptr<NEO::Device>
|
||||
auto device = Device::create(this, pNeoDevice, false, &returnValue);
|
||||
this->devices.push_back(device);
|
||||
|
||||
auto osInterface = device->getNEODevice()->getRootDeviceEnvironment().osInterface.get();
|
||||
if (osInterface && !osInterface->isDebugAttachAvailable() && enableProgramDebugging != NEO::DebuggingMode::disabled) {
|
||||
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr,
|
||||
"Debug mode is not enabled in the system.\n");
|
||||
return ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE;
|
||||
}
|
||||
|
||||
multiOsContextDriver |= device->isImplicitScalingCapable();
|
||||
if (returnValue != ZE_RESULT_SUCCESS) {
|
||||
return returnValue;
|
||||
|
||||
Reference in New Issue
Block a user