From 31c030ff181419cd5daec738267659ec1ef5f647 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 11 Feb 2016 12:41:22 -0500 Subject: [PATCH] P4 to Git Change 1236441 by weizhang@weizhang-lnx-opencl on 2016/02/11 12:33:49 SWDEV-78299 - [Brahma] Setting max single allocation size by comparing cardMemAvailableBytes with cardExtMemAvailableBytes on Brahma. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#540 edit --- rocclr/runtime/device/gpu/gpudevice.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp index 185866a765..931356480b 100644 --- a/rocclr/runtime/device/gpu/gpudevice.cpp +++ b/rocclr/runtime/device/gpu/gpudevice.cpp @@ -355,9 +355,15 @@ void NullDevice::fillDeviceInfo( // should be the size we can actually allocate at application // start. Note that it may not be a guarantee still as the // application progresses. +#if defined(BRAHMA) + info_.maxMemAllocSize_ = std::max( + cl_ulong(memInfo.cardMemAvailableBytes), + cl_ulong(memInfo.cardExtMemAvailableBytes)); +#else info_.maxMemAllocSize_ = std::max( cl_ulong(memInfo.cardLargestFreeBlockBytes), cl_ulong(memInfo.cardExtLargestFreeBlockBytes)); +#endif if (settings().apuSystem_) { info_.maxMemAllocSize_ = std::max(