diff --git a/rocclr/device/pal/palcdefs b/rocclr/device/pal/palcdefs index b7dc9ac2cc..4ea3ee70c5 100644 --- a/rocclr/device/pal/palcdefs +++ b/rocclr/device/pal/palcdefs @@ -1,3 +1,3 @@ # PAL interface versions -PAL_MAJOR_VERSION = 761 +PAL_MAJOR_VERSION = 775 GPUOPEN_MAJOR_VERSION = 42 diff --git a/rocclr/device/pal/paldevice.cpp b/rocclr/device/pal/paldevice.cpp index 6ac7eb2f7a..122d4df34a 100644 --- a/rocclr/device/pal/paldevice.cpp +++ b/rocclr/device/pal/paldevice.cpp @@ -241,7 +241,7 @@ bool NullDevice::create(const char* palName, const amd::Isa& isa, Pal::GfxIpLeve // Report 512MB for all offline devices Pal::GpuMemoryHeapProperties heaps[Pal::GpuHeapCount]; - heaps[Pal::GpuHeapLocal].heapSize = heaps[Pal::GpuHeapLocal].physicalHeapSize = 512 * Mi; + heaps[Pal::GpuHeapLocal].logicalSize = heaps[Pal::GpuHeapLocal].physicalSize = 512 * Mi; Pal::WorkStationCaps wscaps = {}; @@ -388,38 +388,38 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp, uint64_t localRAM; if (GPU_ADD_HBCC_SIZE) { - localRAM = heaps[Pal::GpuHeapLocal].heapSize + heaps[Pal::GpuHeapInvisible].heapSize; + localRAM = heaps[Pal::GpuHeapLocal].logicalSize + heaps[Pal::GpuHeapInvisible].logicalSize; } else { localRAM = - heaps[Pal::GpuHeapLocal].physicalHeapSize + heaps[Pal::GpuHeapInvisible].physicalHeapSize; + heaps[Pal::GpuHeapLocal].physicalSize + heaps[Pal::GpuHeapInvisible].physicalSize; } info_.globalMemSize_ = (static_cast(std::min(GPU_MAX_HEAP_SIZE, 100u)) * static_cast(localRAM) / 100u); uint uswcPercentAvailable = - ((static_cast(heaps[Pal::GpuHeapGartUswc].heapSize) / Mi) > 1536 && IS_WINDOWS) + ((static_cast(heaps[Pal::GpuHeapGartUswc].logicalSize) / Mi) > 1536 && IS_WINDOWS) ? 75 : 50; if (settings().apuSystem_) { - info_.globalMemSize_ += - (static_cast(heaps[Pal::GpuHeapGartUswc].heapSize) * uswcPercentAvailable) / 100; + info_.globalMemSize_ += (static_cast(heaps[Pal::GpuHeapGartUswc].logicalSize) * + uswcPercentAvailable) / 100; } // Find the largest heap form FB memory if (GPU_ADD_HBCC_SIZE) { - info_.maxMemAllocSize_ = std::max(uint64_t(heaps[Pal::GpuHeapLocal].heapSize), - uint64_t(heaps[Pal::GpuHeapInvisible].heapSize)); + info_.maxMemAllocSize_ = std::max(uint64_t(heaps[Pal::GpuHeapLocal].logicalSize), + uint64_t(heaps[Pal::GpuHeapInvisible].logicalSize)); } else { - info_.maxMemAllocSize_ = std::max(uint64_t(heaps[Pal::GpuHeapLocal].physicalHeapSize), - uint64_t(heaps[Pal::GpuHeapInvisible].physicalHeapSize)); + info_.maxMemAllocSize_ = std::max(uint64_t(heaps[Pal::GpuHeapLocal].physicalSize), + uint64_t(heaps[Pal::GpuHeapInvisible].physicalSize)); } #if defined(ATI_OS_WIN) if (settings().apuSystem_) { - info_.maxMemAllocSize_ = std::max( - (static_cast(heaps[Pal::GpuHeapGartUswc].heapSize) * uswcPercentAvailable) / 100, - info_.maxMemAllocSize_); + info_.maxMemAllocSize_ = + std::max((static_cast(heaps[Pal::GpuHeapGartUswc].logicalSize) * + uswcPercentAvailable) / 100, info_.maxMemAllocSize_); } #endif info_.maxMemAllocSize_ = @@ -627,7 +627,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp, info_.cooperativeGroups_ = settings().enableCoopGroups_; info_.cooperativeMultiDeviceGroups_ = settings().enableCoopMultiDeviceGroups_; - if (heaps[Pal::GpuHeapInvisible].heapSize == 0) { + if (heaps[Pal::GpuHeapInvisible].logicalSize == 0) { info_.largeBar_ = true; ClPrint(amd::LOG_INFO, amd::LOG_INIT, "Resizable bar enabled"); } @@ -1876,10 +1876,10 @@ bool Device::globalFreeMemory(size_t* freeMemory) const { // Fill free memory info freeMemory[TotalFreeMemory] = (total_alloced > info().globalMemSize_ ) ? 0 : static_cast((info().globalMemSize_ - total_alloced) / Ki); - if (invisible >= heaps_[Pal::GpuHeapInvisible].heapSize) { + if (invisible >= heaps_[Pal::GpuHeapInvisible].logicalSize) { invisible = 0; } else { - invisible = heaps_[Pal::GpuHeapInvisible].heapSize - invisible; + invisible = heaps_[Pal::GpuHeapInvisible].logicalSize - invisible; } freeMemory[LargestFreeBlock] = static_cast(invisible) / Ki; diff --git a/rocclr/device/pal/palsettings.cpp b/rocclr/device/pal/palsettings.cpp index 2a98c1a903..a144a7d5fa 100644 --- a/rocclr/device/pal/palsettings.cpp +++ b/rocclr/device/pal/palsettings.cpp @@ -525,26 +525,26 @@ bool Settings::create(const Pal::DeviceProperties& palProp, } if (apuSystem_ && - ((heaps[Pal::GpuHeapLocal].heapSize + heaps[Pal::GpuHeapInvisible].heapSize) < (150 * Mi))) { + ((heaps[Pal::GpuHeapLocal].logicalSize + + heaps[Pal::GpuHeapInvisible].logicalSize) < (150 * Mi))) { remoteAlloc_ = true; } // Update resource cache size if (remoteAlloc_) { - resourceCacheSize_ = std::max((heaps[Pal::GpuHeapGartUswc].heapSize / 8), + resourceCacheSize_ = std::max((heaps[Pal::GpuHeapGartUswc].logicalSize / 8), (uint64_t)GPU_RESOURCE_CACHE_SIZE * Mi); } else { - resourceCacheSize_ = - std::max(((heaps[Pal::GpuHeapLocal].heapSize + heaps[Pal::GpuHeapInvisible].heapSize) / 8), - (uint64_t)GPU_RESOURCE_CACHE_SIZE * Mi); + resourceCacheSize_ = std::max(((heaps[Pal::GpuHeapLocal].logicalSize + + heaps[Pal::GpuHeapInvisible].logicalSize) / 8), (uint64_t)GPU_RESOURCE_CACHE_SIZE * Mi); #if !defined(_LP64) resourceCacheSize_ = std::min(resourceCacheSize_, 1 * Gi); #endif } // If is Rebar, override prepinned memory size. - if ((heaps[Pal::GpuHeapInvisible].heapSize == 0) && - (heaps[Pal::GpuHeapLocal].heapSize > 256 * Mi)) { + if ((heaps[Pal::GpuHeapInvisible].logicalSize == 0) && + (heaps[Pal::GpuHeapLocal].logicalSize > 256 * Mi)) { prepinnedMinSize_ = PAL_PREPINNED_MEMORY_SIZE * Ki; }