mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Account for hwInfo when checking for implicit scaling support
Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
71abef22bd
commit
f6c5995219
@@ -130,6 +130,34 @@ TEST_F(DeviceGetCapsTest,
|
||||
EXPECT_TRUE(pDevice->getDeviceInfo().maxMemAllocSize < pDevice->getDeviceInfo().globalMemSize);
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest,
|
||||
givenImplicitScalingTrueWhenInitializeCapsIsCalledThenMaxMemAllocSizeIsSetCorrectly) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(4);
|
||||
pDevice->deviceBitfield = 15;
|
||||
|
||||
DebugManager.flags.EnableImplicitScaling.set(1);
|
||||
DebugManager.flags.EnableWalkerPartition.set(1);
|
||||
DebugManager.flags.EnableSharedSystemUsmSupport.set(1);
|
||||
pDevice->initializeCaps();
|
||||
EXPECT_TRUE(pDevice->getDeviceInfo().maxMemAllocSize == pDevice->getDeviceInfo().globalMemSize);
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest,
|
||||
givenImplicitScalingFalseWhenInitializeCapsIsCalledThenMaxMemAllocSizeIsSetCorrectly) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(4);
|
||||
pDevice->deviceBitfield = 15;
|
||||
|
||||
DebugManager.flags.EnableImplicitScaling.set(0);
|
||||
DebugManager.flags.EnableWalkerPartition.set(1);
|
||||
DebugManager.flags.EnableSharedSystemUsmSupport.set(1);
|
||||
pDevice->initializeCaps();
|
||||
EXPECT_TRUE(pDevice->getDeviceInfo().maxMemAllocSize <= pDevice->getDeviceInfo().globalMemSize);
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenDontForcePreemptionModeDebugVariableWhenCreateDeviceThenSetDefaultHwPreemptionMode) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
{
|
||||
@@ -315,4 +343,4 @@ TEST_F(DeviceGetCapsTest, givenFlagEnabled64kbPagesWhenCallConstructorMemoryMana
|
||||
DebugManager.flags.Enable64kbpages.set(1); // force true
|
||||
memoryManager.reset(new MockMemoryManager(executionEnvironment));
|
||||
EXPECT_TRUE(memoryManager->peek64kbPagesEnabled(0u));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user