mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
fix: Add experimental debug toggle to force 2M local memory size alignment
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
940f23ddbf
commit
6992cb8aeb
@@ -1941,6 +1941,17 @@ TEST_F(WddmMemoryManagerSimpleTest, givenCustomAlignmentBiggerThan2MbAndAllocati
|
||||
testAlignment(size, expectedAlignment);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, givenForced2MBSizeAlignmentWhenAllocationInDevicePoolIsCreatedThenUseProperAlignment) {
|
||||
debugManager.flags.ExperimentalAlignLocalMemorySizeTo2MB.set(true);
|
||||
|
||||
uint32_t size = 1;
|
||||
uint32_t expectedAlignment = MemoryConstants::pageSize2M;
|
||||
testAlignment(size, expectedAlignment);
|
||||
|
||||
size = 1 + MemoryConstants::pageSize2M;
|
||||
testAlignment(size, expectedAlignment);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, givenAllocationLessThen2MbWhenAllocationInDevicePoolIsCreatedThenUse64KbAlignment) {
|
||||
const uint32_t expectedAlignment = MemoryConstants::pageSize64k;
|
||||
const uint32_t size = 2 * MemoryConstants::megaByte - 1;
|
||||
|
||||
Reference in New Issue
Block a user