Update maxMemAlloc for PVC with Implicit Scaling

Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
John Falkowski
2022-01-13 03:16:39 +00:00
committed by Compute-Runtime-Automation
parent 90963b95ad
commit 28345061f0
2 changed files with 38 additions and 1 deletions

View File

@@ -102,6 +102,34 @@ TEST_F(DeviceGetCapsTest, givenMockCompilerInterfaceWhenInitializeCapsIsCalledTh
EXPECT_EQ(1u, pDevice->getDeviceInfo().maxParameterSize);
}
TEST_F(DeviceGetCapsTest,
givenImplicitScalingWhenInitializeCapsIsCalledThenMaxMemAllocSizeIsSetCorrectly) {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.CreateMultipleSubDevices.set(4);
pDevice->deviceBitfield = 15;
DebugManager.flags.EnableWalkerPartition.set(1);
DebugManager.flags.EnableSharedSystemUsmSupport.set(1);
pDevice->initializeCaps();
EXPECT_TRUE(pDevice->getDeviceInfo().maxMemAllocSize == pDevice->getDeviceInfo().globalMemSize);
DebugManager.flags.EnableWalkerPartition.set(0);
DebugManager.flags.EnableSharedSystemUsmSupport.set(1);
pDevice->initializeCaps();
EXPECT_TRUE(pDevice->getDeviceInfo().maxMemAllocSize <= pDevice->getDeviceInfo().globalMemSize);
DebugManager.flags.EnableWalkerPartition.set(1);
DebugManager.flags.EnableSharedSystemUsmSupport.set(0);
pDevice->initializeCaps();
EXPECT_TRUE(pDevice->getDeviceInfo().maxMemAllocSize < pDevice->getDeviceInfo().globalMemSize);
DebugManager.flags.EnableWalkerPartition.set(0);
DebugManager.flags.EnableSharedSystemUsmSupport.set(0);
pDevice->initializeCaps();
EXPECT_TRUE(pDevice->getDeviceInfo().maxMemAllocSize < pDevice->getDeviceInfo().globalMemSize);
}
TEST_F(DeviceGetCapsTest, givenDontForcePreemptionModeDebugVariableWhenCreateDeviceThenSetDefaultHwPreemptionMode) {
DebugManagerStateRestore dbgRestorer;
{