From 5d928a925cd71f1f9761405e95b3ca491f707e35 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 29 Sep 2014 18:19:04 -0400 Subject: [PATCH] P4 to Git Change 1082396 by gandryey@gera-w7 on 2014/09/29 17:30:00 EPR #406110 - OCL20:Basic subtest fails when running on GPU - Reduce max prog variable size to 90% of max single allocation Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#465 edit [ROCm/clr commit: 617422f40fede377c388593fcfbe3b0304582853] --- projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp index afcfae562b..be0216c447 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp @@ -726,7 +726,11 @@ void Device::fillDeviceInfo( info_.maxOnDeviceQueues_ = 1; info_.maxOnDeviceEvents_ = settings().numDeviceEvents_; info_.globalVariablePreferredTotalSize_ = static_cast(info_.globalMemSize_); - info_.maxGlobalVariableSize_ = static_cast(info_.maxMemAllocSize_); + //! \todo Remove % calculation. + //! Use 90% of max single alloc size. + //! Boards with max single alloc size around 4GB will fail allocations + info_.maxGlobalVariableSize_ = static_cast( + amd::alignDown(info_.maxMemAllocSize_ * 9 / 10, 256)); } if (settings().checkExtension(ClAmdDeviceAttributeQuery)) {