@@ -27,7 +27,8 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithGreaterSizeT
2727 auto firstAllocation = kernel.kernelInfo .kernelAllocation ;
2828 EXPECT_NE (nullptr , firstAllocation);
2929 auto firstAllocationSize = firstAllocation->getUnderlyingBufferSize ();
30- EXPECT_EQ (initialHeapSize, firstAllocationSize);
30+ size_t isaPadding = HwHelper::get (defaultHwInfo->platform .eRenderCoreFamily ).getPaddingForISAAllocation ();
31+ EXPECT_EQ (firstAllocationSize, initialHeapSize + isaPadding);
3132
3233 auto firstAllocationId = static_cast <MemoryAllocation *>(firstAllocation)->id ;
3334
@@ -38,8 +39,8 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithGreaterSizeT
3839 auto secondAllocation = kernel.kernelInfo .kernelAllocation ;
3940 EXPECT_NE (nullptr , secondAllocation);
4041 auto secondAllocationSize = secondAllocation->getUnderlyingBufferSize ();
41- EXPECT_NE (initialHeapSize, secondAllocationSize );
42- EXPECT_EQ (newHeapSize, secondAllocationSize );
42+ EXPECT_NE (secondAllocationSize, initialHeapSize + isaPadding );
43+ EXPECT_EQ (secondAllocationSize, newHeapSize + isaPadding );
4344 auto secondAllocationId = static_cast <MemoryAllocation *>(secondAllocation)->id ;
4445
4546 EXPECT_NE (firstAllocationId, secondAllocationId);
@@ -57,7 +58,8 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithSameSizeThen
5758 auto firstAllocation = kernel.kernelInfo .kernelAllocation ;
5859 EXPECT_NE (nullptr , firstAllocation);
5960 auto firstAllocationSize = firstAllocation->getUnderlyingBufferSize ();
60- EXPECT_EQ (initialHeapSize, firstAllocationSize);
61+ size_t isaPadding = HwHelper::get (defaultHwInfo->platform .eRenderCoreFamily ).getPaddingForISAAllocation ();
62+ EXPECT_EQ (firstAllocationSize, initialHeapSize + isaPadding);
6163
6264 auto firstAllocationId = static_cast <MemoryAllocation *>(firstAllocation)->id ;
6365
@@ -68,7 +70,7 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithSameSizeThen
6870 auto secondAllocation = kernel.kernelInfo .kernelAllocation ;
6971 EXPECT_NE (nullptr , secondAllocation);
7072 auto secondAllocationSize = secondAllocation->getUnderlyingBufferSize ();
71- EXPECT_EQ (initialHeapSize, secondAllocationSize );
73+ EXPECT_EQ (secondAllocationSize, initialHeapSize + isaPadding );
7274 auto secondAllocationId = static_cast <MemoryAllocation *>(secondAllocation)->id ;
7375
7476 EXPECT_EQ (firstAllocationId, secondAllocationId);
@@ -86,7 +88,8 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithSmallerSizeT
8688 auto firstAllocation = kernel.kernelInfo .kernelAllocation ;
8789 EXPECT_NE (nullptr , firstAllocation);
8890 auto firstAllocationSize = firstAllocation->getUnderlyingBufferSize ();
89- EXPECT_EQ (initialHeapSize, firstAllocationSize);
91+ size_t isaPadding = HwHelper::get (defaultHwInfo->platform .eRenderCoreFamily ).getPaddingForISAAllocation ();
92+ EXPECT_EQ (firstAllocationSize, initialHeapSize + isaPadding);
9093
9194 auto firstAllocationId = static_cast <MemoryAllocation *>(firstAllocation)->id ;
9295
@@ -97,7 +100,7 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithSmallerSizeT
97100 auto secondAllocation = kernel.kernelInfo .kernelAllocation ;
98101 EXPECT_NE (nullptr , secondAllocation);
99102 auto secondAllocationSize = secondAllocation->getUnderlyingBufferSize ();
100- EXPECT_EQ (initialHeapSize, secondAllocationSize );
103+ EXPECT_EQ (secondAllocationSize, initialHeapSize + isaPadding );
101104 auto secondAllocationId = static_cast <MemoryAllocation *>(secondAllocation)->id ;
102105
103106 EXPECT_EQ (firstAllocationId, secondAllocationId);
0 commit comments