@@ -2119,6 +2119,28 @@ TEST_F(BuiltInTests, WhenGettingSipKernelThenReturnProgramCreatedFromIsaAcquired
21192119 mockCompilerInterface->releaseDummyGenBinary ();
21202120}
21212121
2122+ TEST_F (BuiltInTests, WhenGettingSipKernelThenItIsAllocatedInFrontWindow) {
2123+ auto mockCompilerInterface = new MockCompilerInterface ();
2124+ pDevice->getExecutionEnvironment ()->rootDeviceEnvironments [rootDeviceIndex]->compilerInterface .reset (mockCompilerInterface);
2125+ auto builtins = new BuiltIns;
2126+ pDevice->getExecutionEnvironment ()->rootDeviceEnvironments [rootDeviceIndex]->builtins .reset (builtins);
2127+ mockCompilerInterface->sipKernelBinaryOverride = mockCompilerInterface->getDummyGenBinary ();
2128+
2129+ const SipKernel &sipKernel = builtins->getSipKernel (SipKernelType::Csr, *pDevice);
2130+
2131+ HeapAssigner heapAssigner;
2132+ bool useLocalMem = heapAssigner.useExternal32BitHeap (sipKernel.getSipAllocation ()->getAllocationType ()) ? HwHelper::get (defaultHwInfo->platform .eRenderCoreFamily ).heapInLocalMem (*defaultHwInfo) : false ;
2133+ auto heap = heapAssigner.get32BitHeapIndex (sipKernel.getSipAllocation ()->getAllocationType (), useLocalMem, *defaultHwInfo, true );
2134+
2135+ auto base = pDevice->getMemoryManager ()->getGfxPartition (rootDeviceIndex)->getHeapBase (heap);
2136+ auto limit = pDevice->getMemoryManager ()->getGfxPartition (rootDeviceIndex)->getHeapLimit (heap);
2137+
2138+ EXPECT_LE (base, GmmHelper::decanonize (sipKernel.getSipAllocation ()->getGpuAddress ()));
2139+ EXPECT_GT (limit, GmmHelper::decanonize (sipKernel.getSipAllocation ()->getGpuAddress ()));
2140+
2141+ mockCompilerInterface->releaseDummyGenBinary ();
2142+ }
2143+
21222144TEST_F (BuiltInTests, givenSipKernelWhenItIsCreatedThenItHasGraphicsAllocationForKernel) {
21232145 const SipKernel &sipKern = pDevice->getBuiltIns ()->getSipKernel (SipKernelType::Csr, pContext->getDevice (0 )->getDevice ());
21242146 auto sipAllocation = sipKern.getSipAllocation ();
0 commit comments