mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Revert "Force 64KB page size for cpu alignment in dual storage allocation"
This reverts commit 7ff6a5c1fa
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
64d3f95410
commit
7a3976ad64
@ -355,8 +355,8 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenSharedAllocationIsCreatedWithDebugFlagSe
|
|||||||
EXPECT_EQ(allocationSize, allocation->size);
|
EXPECT_EQ(allocationSize, allocation->size);
|
||||||
EXPECT_EQ(mockContext.getDevice(0u), allocation->device->getSpecializedDevice<ClDevice>());
|
EXPECT_EQ(mockContext.getDevice(0u), allocation->device->getSpecializedDevice<ClDevice>());
|
||||||
|
|
||||||
EXPECT_EQ(alignUp(allocationSize, MemoryConstants::pageSize64k), gpuAllocation->getUnderlyingBufferSize());
|
EXPECT_EQ(alignUp(allocationSize, 64 * KB), gpuAllocation->getUnderlyingBufferSize());
|
||||||
EXPECT_EQ(alignUp(allocationSize, MemoryConstants::pageSize64k), allocation->cpuAllocation->getUnderlyingBufferSize());
|
EXPECT_EQ(alignUp(allocationSize, MemoryConstants::pageSize2Mb), allocation->cpuAllocation->getUnderlyingBufferSize());
|
||||||
|
|
||||||
EXPECT_EQ(AllocationType::SVM_GPU, gpuAllocation->getAllocationType());
|
EXPECT_EQ(AllocationType::SVM_GPU, gpuAllocation->getAllocationType());
|
||||||
EXPECT_EQ(AllocationType::SVM_CPU, allocation->cpuAllocation->getAllocationType());
|
EXPECT_EQ(AllocationType::SVM_CPU, allocation->cpuAllocation->getAllocationType());
|
||||||
@ -384,8 +384,8 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenSharedAllocationIsCreatedWithLocalMemory
|
|||||||
EXPECT_EQ(InternalMemoryType::SHARED_UNIFIED_MEMORY, allocation->memoryType);
|
EXPECT_EQ(InternalMemoryType::SHARED_UNIFIED_MEMORY, allocation->memoryType);
|
||||||
EXPECT_EQ(allocationSize, allocation->size);
|
EXPECT_EQ(allocationSize, allocation->size);
|
||||||
|
|
||||||
EXPECT_EQ(alignUp(allocationSize, MemoryConstants::pageSize64k), gpuAllocation->getUnderlyingBufferSize());
|
EXPECT_EQ(alignUp(allocationSize, 64 * KB), gpuAllocation->getUnderlyingBufferSize());
|
||||||
EXPECT_EQ(alignUp(allocationSize, MemoryConstants::pageSize64k), allocation->cpuAllocation->getUnderlyingBufferSize());
|
EXPECT_EQ(alignUp(allocationSize, MemoryConstants::pageSize2Mb), allocation->cpuAllocation->getUnderlyingBufferSize());
|
||||||
|
|
||||||
EXPECT_EQ(AllocationType::SVM_GPU, gpuAllocation->getAllocationType());
|
EXPECT_EQ(AllocationType::SVM_GPU, gpuAllocation->getAllocationType());
|
||||||
EXPECT_EQ(AllocationType::SVM_CPU, allocation->cpuAllocation->getAllocationType());
|
EXPECT_EQ(AllocationType::SVM_CPU, allocation->cpuAllocation->getAllocationType());
|
||||||
|
@ -408,7 +408,7 @@ void *SVMAllocsManager::createUnifiedAllocationWithDeviceStorage(size_t size, co
|
|||||||
auto rootDeviceIndex = unifiedMemoryProperties.device
|
auto rootDeviceIndex = unifiedMemoryProperties.device
|
||||||
? unifiedMemoryProperties.device->getRootDeviceIndex()
|
? unifiedMemoryProperties.device->getRootDeviceIndex()
|
||||||
: *unifiedMemoryProperties.rootDeviceIndices.begin();
|
: *unifiedMemoryProperties.rootDeviceIndices.begin();
|
||||||
size_t alignedSizeCpu = alignUp<size_t>(size, MemoryConstants::pageSize64k);
|
size_t alignedSizeCpu = alignUp<size_t>(size, MemoryConstants::pageSize2Mb);
|
||||||
size_t pageSizeForAlignment = MemoryConstants::pageSize64k;
|
size_t pageSizeForAlignment = MemoryConstants::pageSize64k;
|
||||||
size_t alignedSizeGpu = alignUp<size_t>(size, pageSizeForAlignment);
|
size_t alignedSizeGpu = alignUp<size_t>(size, pageSizeForAlignment);
|
||||||
DeviceBitfield subDevices = unifiedMemoryProperties.subdeviceBitfields.at(rootDeviceIndex);
|
DeviceBitfield subDevices = unifiedMemoryProperties.subdeviceBitfields.at(rootDeviceIndex);
|
||||||
@ -417,7 +417,7 @@ void *SVMAllocsManager::createUnifiedAllocationWithDeviceStorage(size_t size, co
|
|||||||
alignedSizeCpu, AllocationType::SVM_CPU,
|
alignedSizeCpu, AllocationType::SVM_CPU,
|
||||||
false, // isMultiStorageAllocation
|
false, // isMultiStorageAllocation
|
||||||
subDevices};
|
subDevices};
|
||||||
cpuProperties.alignment = MemoryConstants::pageSize64k;
|
cpuProperties.alignment = MemoryConstants::pageSize2Mb;
|
||||||
auto cacheRegion = MemoryPropertiesHelper::getCacheRegion(unifiedMemoryProperties.allocationFlags);
|
auto cacheRegion = MemoryPropertiesHelper::getCacheRegion(unifiedMemoryProperties.allocationFlags);
|
||||||
MemoryPropertiesHelper::fillCachePolicyInProperties(cpuProperties, false, svmProperties.readOnly, false, cacheRegion);
|
MemoryPropertiesHelper::fillCachePolicyInProperties(cpuProperties, false, svmProperties.readOnly, false, cacheRegion);
|
||||||
GraphicsAllocation *allocationCpu = memoryManager->allocateGraphicsMemoryWithProperties(cpuProperties);
|
GraphicsAllocation *allocationCpu = memoryManager->allocateGraphicsMemoryWithProperties(cpuProperties);
|
||||||
|
Reference in New Issue
Block a user