@@ -120,6 +120,34 @@ TEST(Debugger, givenDebuggingEnabledInExecEnvWhenAllocatingIsaThenSingleBankIsUs
120120 neoDevice->getMemoryManager ()->freeGraphicsMemory (allocation);
121121}
122122
123+ TEST (Debugger, givenTileAttachAndDebuggingEnabledInExecEnvWhenAllocatingIsaThenMultipleBanksAreUsed) {
124+ DebugManagerStateRestore restorer;
125+ NEO::DebugManager.flags .ExperimentalEnableTileAttach .set (1 );
126+
127+ auto executionEnvironment = new NEO::ExecutionEnvironment ();
128+ executionEnvironment->prepareRootDeviceEnvironments (1 );
129+ executionEnvironment->setDebuggingEnabled ();
130+
131+ auto hwInfo = *NEO::defaultHwInfo.get ();
132+ hwInfo.featureTable .flags .ftrLocalMemory = true ;
133+ executionEnvironment->rootDeviceEnvironments [0 ]->setHwInfo (&hwInfo);
134+ executionEnvironment->rootDeviceEnvironments [0 ]->initGmm ();
135+ executionEnvironment->initializeMemoryManager ();
136+
137+ std::unique_ptr<NEO::MockDevice> neoDevice (NEO::MockDevice::create<NEO::MockDevice>(executionEnvironment, 0u ));
138+
139+ auto allocation = neoDevice->getMemoryManager ()->allocateGraphicsMemoryWithProperties (
140+ {neoDevice->getRootDeviceIndex (), 4096 , NEO::AllocationType::KERNEL_ISA, DeviceBitfield{3 }});
141+
142+ if (allocation->getMemoryPool () == MemoryPool::LocalMemory) {
143+ EXPECT_EQ (3u , allocation->storageInfo .getMemoryBanks ());
144+ } else {
145+ EXPECT_EQ (0u , allocation->storageInfo .getMemoryBanks ());
146+ }
147+
148+ neoDevice->getMemoryManager ()->freeGraphicsMemory (allocation);
149+ }
150+
123151TEST (Debugger, WhenInitializingDebuggerL0ThenCapabilitiesAreAdjustedAndDebuggerIsCreated) {
124152 auto executionEnvironment = new NEO::ExecutionEnvironment ();
125153 executionEnvironment->incRefInternal ();
0 commit comments