mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
fix: initialize debugger before creating engines
Related-To: NEO-12571 Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dd631610b3
commit
f6a89bbc03
@@ -32,7 +32,6 @@ DebuggerL0::DebuggerL0(NEO::Device *device) : device(device) {
|
||||
commandQueueCount[i] = 0;
|
||||
uuidL0CommandQueueHandle[i] = 0;
|
||||
}
|
||||
initialize();
|
||||
}
|
||||
|
||||
void DebuggerL0::initialize() {
|
||||
|
||||
@@ -106,6 +106,7 @@ class DebuggerL0 : public NEO::Debugger, NEO::NonCopyableOrMovableClass {
|
||||
|
||||
MOCKABLE_VIRTUAL bool attachZebinModuleToSegmentAllocations(const StackVec<NEO::GraphicsAllocation *, 32> &kernelAlloc, uint32_t &moduleHandle, uint32_t elfHandle);
|
||||
MOCKABLE_VIRTUAL bool removeZebinModule(uint32_t moduleHandle);
|
||||
void initialize();
|
||||
|
||||
void setSingleAddressSpaceSbaTracking(bool value) {
|
||||
singleAddressSpaceSbaTracking = value;
|
||||
@@ -120,8 +121,6 @@ class DebuggerL0 : public NEO::Debugger, NEO::NonCopyableOrMovableClass {
|
||||
protected:
|
||||
static bool initDebuggingInOs(NEO::OSInterface *osInterface);
|
||||
|
||||
void initialize();
|
||||
|
||||
NEO::Device *device = nullptr;
|
||||
NEO::GraphicsAllocation *sbaAllocation = nullptr;
|
||||
std::unordered_map<uint32_t, NEO::GraphicsAllocation *> perContextSbaAllocations;
|
||||
|
||||
@@ -217,6 +217,12 @@ bool Device::createDeviceImpl() {
|
||||
return false;
|
||||
}
|
||||
|
||||
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(getHardwareInfo());
|
||||
if (!isSubDevice()) {
|
||||
// initialize common resources once
|
||||
initializeCommonResources();
|
||||
}
|
||||
|
||||
// create engines
|
||||
if (!initDeviceWithEngines()) {
|
||||
return false;
|
||||
@@ -227,8 +233,9 @@ bool Device::createDeviceImpl() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// initialize common resources once
|
||||
initializeCommonResources();
|
||||
if (getL0Debugger()) {
|
||||
getL0Debugger()->initialize();
|
||||
}
|
||||
|
||||
// continue proper init for all devices
|
||||
return initDeviceFully();
|
||||
@@ -237,11 +244,8 @@ bool Device::createDeviceImpl() {
|
||||
bool Device::initDeviceWithEngines() {
|
||||
setAsEngineInstanced();
|
||||
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(hwInfo);
|
||||
|
||||
auto &productHelper = getProductHelper();
|
||||
if (getDebugger() && productHelper.disableL3CacheForDebug(hwInfo)) {
|
||||
if (getDebugger() && productHelper.disableL3CacheForDebug(getHardwareInfo())) {
|
||||
getGmmHelper()->forceAllResourcesUncached();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user