From 62eb98e152fbf4f369813bb08bad58b471825fd9 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 28 Oct 2014 17:03:08 -0400 Subject: [PATCH] P4 to Git Change 1091664 by bdhanase@bala_workpc_ocl on 2014/10/28 16:36:55 EPR #405824 - Back out changelist 1088793 Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#473 edit --- rocclr/runtime/device/gpu/gpudevice.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp index bc2c2b7445..fa82d2c4d0 100644 --- a/rocclr/runtime/device/gpu/gpudevice.cpp +++ b/rocclr/runtime/device/gpu/gpudevice.cpp @@ -529,7 +529,14 @@ void Device::fillDeviceInfo( info_.maxMemAllocSize_ = std::max( cl_ulong(calStatus.largestBlockVisibleHeap * Mi), cl_ulong(calStatus.largestBlockInvisibleHeap * Mi)); - + +#if defined(ATI_OS_WIN) + if (settings().apuSystem_) { + info_.maxMemAllocSize_ = std::max( + ((static_cast(calAttr.uncachedRemoteRAM) * Mi) / 2), + info_.maxMemAllocSize_); + } +#endif info_.maxMemAllocSize_ = cl_ulong(info_.maxMemAllocSize_ * std::min(GPU_MAX_ALLOC_PERCENT, 100u) / 100u);