mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
fix: Align svm cpu to alignment passed to properties
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4d5b4ef4f1
commit
d66da494d4
@@ -582,12 +582,13 @@ void *SVMAllocsManager::createUnifiedAllocationWithDeviceStorage(size_t size, co
|
||||
const auto pageSizeForAlignment = alignUp<size_t>(unifiedMemoryProperties.alignment, MemoryConstants::pageSize64k);
|
||||
size_t alignedSize = alignUp<size_t>(size, MemoryConstants::pageSize64k);
|
||||
DeviceBitfield subDevices = unifiedMemoryProperties.subdeviceBitfields.at(rootDeviceIndex);
|
||||
auto cpuAlignment = std::max(pageSizeForAlignment, memoryManager->peekExecutionEnvironment().rootDeviceEnvironments[rootDeviceIndex]->getProductHelper().getSvmCpuAlignment());
|
||||
AllocationProperties cpuProperties{rootDeviceIndex,
|
||||
!useExternalHostPtrForCpu, // allocateMemory
|
||||
alignedSize, AllocationType::SVM_CPU,
|
||||
alignUp(alignedSize, cpuAlignment), AllocationType::SVM_CPU,
|
||||
false, // isMultiStorageAllocation
|
||||
subDevices};
|
||||
cpuProperties.alignment = std::max(pageSizeForAlignment, memoryManager->peekExecutionEnvironment().rootDeviceEnvironments[rootDeviceIndex]->getProductHelper().getSvmCpuAlignment());
|
||||
cpuProperties.alignment = cpuAlignment;
|
||||
cpuProperties.flags.isUSMHostAllocation = useExternalHostPtrForCpu;
|
||||
cpuProperties.forceKMDAllocation = true;
|
||||
cpuProperties.makeGPUVaDifferentThanCPUPtr = true;
|
||||
|
||||
Reference in New Issue
Block a user