fix: Make debug area resident for subdevices
Resolves: NEO-9455 Signed-off-by: Jemale Lockett <jemale.lockett@intel.com>
This commit is contained in:
parent
acdd4f99c8
commit
7c42c255b9
|
@ -95,6 +95,11 @@ void DebuggerL0::initialize() {
|
|||
NEO::MemoryOperationsHandler *memoryOperationsIface = rootDeviceEnvironment.memoryOperationsInterface.get();
|
||||
if (memoryOperationsIface) {
|
||||
memoryOperationsIface->makeResident(device, ArrayRef<NEO::GraphicsAllocation *>(&moduleDebugArea, 1));
|
||||
auto numSubDevices = device->getNumSubDevices();
|
||||
for (uint32_t i = 0; i < numSubDevices; i++) {
|
||||
auto subDevice = device->getSubDevice(i);
|
||||
memoryOperationsIface->makeResident(subDevice, ArrayRef<NEO::GraphicsAllocation *>(&moduleDebugArea, 1));
|
||||
}
|
||||
}
|
||||
|
||||
const auto &productHelper = device->getProductHelper();
|
||||
|
|
|
@ -216,6 +216,22 @@ HWTEST_F(L0DebuggerTest, givenDebuggerWhenCreatedThenModuleHeapDebugAreaIsCreate
|
|||
neoDevice->getMemoryManager()->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
HWTEST_F(L0DebuggerTest, givenDebuggerCreatedWhenSubdevicesExistThenModuleHeapDebugAreaIsResidentForSubDevices) {
|
||||
DebugManagerStateRestore restorer;
|
||||
constexpr auto numSubDevices = 2;
|
||||
debugManager.flags.CreateMultipleSubDevices.set(numSubDevices);
|
||||
auto executionEnvironment = new NEO::ExecutionEnvironment;
|
||||
auto devices = NEO::DeviceFactory::createDevices(*executionEnvironment);
|
||||
auto neoDevice = devices[0].get();
|
||||
|
||||
auto memoryOperationsHandler = new NEO::MockMemoryOperations();
|
||||
memoryOperationsHandler->makeResidentCalledCount = 0;
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->memoryOperationsInterface.reset(memoryOperationsHandler);
|
||||
auto debugger = std::make_unique<MockDebuggerL0Hw<FamilyType>>(neoDevice);
|
||||
|
||||
EXPECT_EQ((1 + numSubDevices), memoryOperationsHandler->makeResidentCalledCount);
|
||||
}
|
||||
|
||||
HWTEST_F(L0DebuggerTest, givenBindlessSipWhenModuleHeapDebugAreaIsCreatedThenReservedFieldIsSet) {
|
||||
DebugManagerStateRestore restorer;
|
||||
NEO::debugManager.flags.UseBindlessDebugSip.set(1);
|
||||
|
|
Loading…
Reference in New Issue