L0Debug - allocate per-tile ISA when tileAttach is enabled

Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-08-18 13:02:46 +00:00
committed by Compute-Runtime-Automation
parent 0011368775
commit 01b324953e
2 changed files with 29 additions and 1 deletions

View File

@ -47,7 +47,7 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
case AllocationType::DEBUG_MODULE_AREA: {
auto placeIsaOnMultiTile = (properties.subDevicesBitfield.count() != 1);
if (executionEnvironment.isDebuggingEnabled()) {
if (executionEnvironment.isDebuggingEnabled() && !DebugManager.flags.ExperimentalEnableTileAttach.get()) {
placeIsaOnMultiTile = false;
}

View File

@ -120,6 +120,34 @@ TEST(Debugger, givenDebuggingEnabledInExecEnvWhenAllocatingIsaThenSingleBankIsUs
neoDevice->getMemoryManager()->freeGraphicsMemory(allocation);
}
TEST(Debugger, givenTileAttachAndDebuggingEnabledInExecEnvWhenAllocatingIsaThenMultipleBanksAreUsed) {
DebugManagerStateRestore restorer;
NEO::DebugManager.flags.ExperimentalEnableTileAttach.set(1);
auto executionEnvironment = new NEO::ExecutionEnvironment();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->setDebuggingEnabled();
auto hwInfo = *NEO::defaultHwInfo.get();
hwInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&hwInfo);
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
executionEnvironment->initializeMemoryManager();
std::unique_ptr<NEO::MockDevice> neoDevice(NEO::MockDevice::create<NEO::MockDevice>(executionEnvironment, 0u));
auto allocation = neoDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(
{neoDevice->getRootDeviceIndex(), 4096, NEO::AllocationType::KERNEL_ISA, DeviceBitfield{3}});
if (allocation->getMemoryPool() == MemoryPool::LocalMemory) {
EXPECT_EQ(3u, allocation->storageInfo.getMemoryBanks());
} else {
EXPECT_EQ(0u, allocation->storageInfo.getMemoryBanks());
}
neoDevice->getMemoryManager()->freeGraphicsMemory(allocation);
}
TEST(Debugger, WhenInitializingDebuggerL0ThenCapabilitiesAreAdjustedAndDebuggerIsCreated) {
auto executionEnvironment = new NEO::ExecutionEnvironment();
executionEnvironment->incRefInternal();