mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Allocate single Isa instance when debugging enabled
- Related-To: NEO-6221 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ae6d58bcb0
commit
8d3438a5fb
@@ -108,6 +108,30 @@ TEST(Debugger, givenL0DebuggerOFFWhenGettingStateSaveAreaHeaderThenValidSipTypeI
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Debugger, givenDebuggingEnabledInExecEnvWhenAllocatingIsaThenSingleBankIsUsed) {
|
||||
auto executionEnvironment = new NEO::ExecutionEnvironment();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
hwInfo.featureTable.ftrLocalMemory = true;
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&hwInfo);
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
|
||||
std::unique_ptr<NEO::MockDevice> neoDevice(NEO::MockDevice::create<NEO::MockDevice>(executionEnvironment, 0u));
|
||||
|
||||
auto allocation = neoDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(
|
||||
{neoDevice->getRootDeviceIndex(), 4096, NEO::GraphicsAllocation::AllocationType::KERNEL_ISA, neoDevice->getDeviceBitfield()});
|
||||
|
||||
if (allocation->getMemoryPool() == MemoryPool::LocalMemory) {
|
||||
EXPECT_EQ(1u, allocation->storageInfo.getMemoryBanks());
|
||||
} else {
|
||||
EXPECT_EQ(0u, allocation->storageInfo.getMemoryBanks());
|
||||
}
|
||||
|
||||
neoDevice->getMemoryManager()->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
HWTEST_F(L0DebuggerTest, givenL0DebuggerWhenCreatedThenPerContextSbaTrackingBuffersAreAllocated) {
|
||||
auto debugger = device->getL0Debugger();
|
||||
ASSERT_NE(nullptr, debugger);
|
||||
|
||||
Reference in New Issue
Block a user