mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Split Standard 64KB heap for multiple root devices
Resolves: NEO-4196 Change-Id: Ibd76eb2447791e34ba3e1c27bbc7f5cd09325e98 Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
dbd12dbaff
commit
a34268fc54
@@ -39,7 +39,7 @@ DrmMemoryManager::DrmMemoryManager(gemCloseWorkerMode mode,
|
||||
validateHostPtrMemory(validateHostPtrMemory) {
|
||||
auto gpuAddressSpace = executionEnvironment.getHardwareInfo()->capabilityTable.gpuAddressSpace;
|
||||
for (uint32_t rootDeviceIndex = 0; rootDeviceIndex < gfxPartitions.size(); ++rootDeviceIndex) {
|
||||
getGfxPartition(rootDeviceIndex)->init(gpuAddressSpace, getSizeToReserve(), rootDeviceIndex);
|
||||
getGfxPartition(rootDeviceIndex)->init(gpuAddressSpace, getSizeToReserve(), rootDeviceIndex, gfxPartitions.size());
|
||||
}
|
||||
MemoryManager::virtualPaddingAvailable = true;
|
||||
if (mode != gemCloseWorkerMode::gemCloseWorkerInactive) {
|
||||
|
||||
@@ -830,7 +830,7 @@ bool Wddm::waitFromCpu(uint64_t lastFenceValue, const MonitoredFence &monitoredF
|
||||
return status == STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void Wddm::initGfxPartition(GfxPartition &outGfxPartition) const {
|
||||
void Wddm::initGfxPartition(GfxPartition &outGfxPartition, uint32_t rootDeviceIndex, size_t numRootDevices) const {
|
||||
if (gfxPartition.SVM.Limit != 0) {
|
||||
outGfxPartition.heapInit(HeapIndex::HEAP_SVM, gfxPartition.SVM.Base, gfxPartition.SVM.Limit - gfxPartition.SVM.Base + 1);
|
||||
} else if (is32bit) {
|
||||
@@ -839,7 +839,9 @@ void Wddm::initGfxPartition(GfxPartition &outGfxPartition) const {
|
||||
|
||||
outGfxPartition.heapInit(HeapIndex::HEAP_STANDARD, gfxPartition.Standard.Base, gfxPartition.Standard.Limit - gfxPartition.Standard.Base + 1);
|
||||
|
||||
outGfxPartition.heapInit(HeapIndex::HEAP_STANDARD64KB, gfxPartition.Standard64KB.Base, gfxPartition.Standard64KB.Limit - gfxPartition.Standard64KB.Base + 1);
|
||||
// Split HEAP_STANDARD64K among root devices
|
||||
auto gfxStandard64KBSize = alignDown((gfxPartition.Standard64KB.Limit - gfxPartition.Standard64KB.Base + 1) / numRootDevices, GfxPartition::heapGranularity);
|
||||
outGfxPartition.heapInit(HeapIndex::HEAP_STANDARD64KB, gfxPartition.Standard64KB.Base + rootDeviceIndex * gfxStandard64KBSize, gfxStandard64KBSize);
|
||||
|
||||
for (auto heap : GfxPartition::heap32Names) {
|
||||
outGfxPartition.heapInit(heap, gfxPartition.Heap32[static_cast<uint32_t>(heap)].Base,
|
||||
|
||||
@@ -106,7 +106,7 @@ class Wddm {
|
||||
return gfxPartition;
|
||||
}
|
||||
|
||||
void initGfxPartition(GfxPartition &outGfxPartition) const;
|
||||
void initGfxPartition(GfxPartition &outGfxPartition, uint32_t rootDeviceIndex, size_t numRootDevices) const;
|
||||
|
||||
const std::string &getDeviceRegistryPath() const {
|
||||
return deviceRegistryPath;
|
||||
|
||||
@@ -44,7 +44,7 @@ WddmMemoryManager::WddmMemoryManager(ExecutionEnvironment &executionEnvironment)
|
||||
mallocRestrictions.minAddress = 0u;
|
||||
|
||||
for (uint32_t rootDeviceIndex = 0; rootDeviceIndex < gfxPartitions.size(); ++rootDeviceIndex) {
|
||||
getWddm(rootDeviceIndex).initGfxPartition(*getGfxPartition(rootDeviceIndex));
|
||||
getWddm(rootDeviceIndex).initGfxPartition(*getGfxPartition(rootDeviceIndex), rootDeviceIndex, gfxPartitions.size());
|
||||
mallocRestrictions.minAddress = std::max(mallocRestrictions.minAddress, getWddm(rootDeviceIndex).getWddmMinAddress());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user