From 54aed91b3b75056774a01df95b7bc4a0d95dc6e0 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 16 Oct 2015 19:04:45 -0400
Subject: [PATCH] P4 to Git Change 1200905 by bdhanase@bala_workpc_ocl on
2015/10/16 18:57:48
SWDEV-78103 - If USWC size is less than 1.5 GB, then report 50% else report 75%.
Reviewed by: German
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#530 edit
---
rocclr/runtime/device/gpu/gpudevice.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp
index 373206607c..fe2a87214f 100644
--- a/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -285,9 +285,10 @@ void NullDevice::fillDeviceInfo(
(static_cast(std::min(GPU_MAX_HEAP_SIZE, 100u)) *
static_cast(calAttr.localRAM) / 100u) * Mi;
#endif
+ int uswcPercentAvailable = (calAttr.uncachedRemoteRAM > 1536) ? 75 : 50;
if (settings().apuSystem_) {
info_.globalMemSize_ +=
- (static_cast(calAttr.uncachedRemoteRAM) * Mi * 75)/100;
+ (static_cast(calAttr.uncachedRemoteRAM) * Mi * uswcPercentAvailable)/100;
}
// We try to calculate the largest available memory size from
@@ -302,7 +303,7 @@ void NullDevice::fillDeviceInfo(
#if defined(ATI_OS_WIN)
if (settings().apuSystem_) {
info_.maxMemAllocSize_ = std::max(
- (static_cast(calAttr.uncachedRemoteRAM) * Mi * 75)/100,
+ (static_cast(calAttr.uncachedRemoteRAM) * Mi * uswcPercentAvailable)/100,
info_.maxMemAllocSize_);
}
#endif