SWDEV-286150 - Switch PAL to 775 version

Change-Id: I8e64cbe0fea273d4bd6f7d3ebd66feb628fac6b9
This commit is contained in:
German
2022-11-04 13:50:06 -04:00
committed by German Andryeyev
parent d0a57e4905
commit c1b22840fa
3 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
# PAL interface versions
PAL_MAJOR_VERSION = 761
PAL_MAJOR_VERSION = 775
GPUOPEN_MAJOR_VERSION = 42
+16 -16
View File
@@ -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<uint64_t>(std::min(GPU_MAX_HEAP_SIZE, 100u)) *
static_cast<uint64_t>(localRAM) / 100u);
uint uswcPercentAvailable =
((static_cast<uint64_t>(heaps[Pal::GpuHeapGartUswc].heapSize) / Mi) > 1536 && IS_WINDOWS)
((static_cast<uint64_t>(heaps[Pal::GpuHeapGartUswc].logicalSize) / Mi) > 1536 && IS_WINDOWS)
? 75
: 50;
if (settings().apuSystem_) {
info_.globalMemSize_ +=
(static_cast<uint64_t>(heaps[Pal::GpuHeapGartUswc].heapSize) * uswcPercentAvailable) / 100;
info_.globalMemSize_ += (static_cast<uint64_t>(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<uint64_t>(heaps[Pal::GpuHeapGartUswc].heapSize) * uswcPercentAvailable) / 100,
info_.maxMemAllocSize_);
info_.maxMemAllocSize_ =
std::max((static_cast<uint64_t>(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<size_t>((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<size_t>(invisible) / Ki;
+7 -7
View File
@@ -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;
}