From 37d6de3e77648e3b2ee91ae58cdc19b178b7624c Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 1 May 2015 18:36:34 -0400
Subject: [PATCH] P4 to Git Change 1146707 by bdhanase@bala_workpc_ocl on
2015/05/01 18:29:18
EPR #410821 - Reduced the maxMemAlloc and global memory size on APUs to 75% of uncachedRemoteRAM.
http://ocltc.amd.com/reviews/r/7425/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#509 edit
[ROCm/clr commit: 51f8154b235f84a7018567ca4bcd5cdf4aa83339]
---
projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
index 27f5c77de9..8e072c8639 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -314,7 +314,7 @@ void NullDevice::fillDeviceInfo(
#endif
if (settings().apuSystem_) {
info_.globalMemSize_ +=
- (static_cast(calAttr.uncachedRemoteRAM) * Mi);
+ (static_cast(calAttr.uncachedRemoteRAM) * Mi * 75)/100;
}
// We try to calculate the largest available memory size from
@@ -329,7 +329,7 @@ void NullDevice::fillDeviceInfo(
#if defined(ATI_OS_WIN)
if (settings().apuSystem_) {
info_.maxMemAllocSize_ = std::max(
- (static_cast(calAttr.uncachedRemoteRAM) * Mi),
+ (static_cast(calAttr.uncachedRemoteRAM) * Mi * 75)/100,
info_.maxMemAllocSize_);
}
#endif