From 3bfd6767a3f2a16f714e8b4ae7be609c2ff1eb90 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 1 Nov 2016 16:01:35 -0500 Subject: [PATCH] P4 to Git Change 1334942 by gandryey@gera-w8 on 2016/11/01 16:33:53 SWDEV-106446 - OpenCL constant address space limit control - Use maxMemAllocSize for the maximum constant buffer size http://ocltc.amd.com/reviews/r/11725/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#557 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#31 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#23 edit --- rocclr/runtime/device/gpu/gpudevice.cpp | 3 ++- rocclr/runtime/device/pal/paldevice.cpp | 2 +- rocclr/runtime/device/rocm/rocdevice.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp index 4540c8351d..fd71dfb10a 100644 --- a/rocclr/runtime/device/gpu/gpudevice.cpp +++ b/rocclr/runtime/device/gpu/gpudevice.cpp @@ -440,7 +440,8 @@ NullDevice::fillDeviceInfo( //! should be able to create a view with 256 bytes alignement info_.memBaseAddrAlign_ = 8 * MemBaseAlignment; - info_.maxConstantBufferSize_ = 64 * Ki; + info_.maxConstantBufferSize_ = + (settings().ciPlus_) ? info_.maxMemAllocSize_ : 64 * Ki; info_.maxConstantArgs_ = MaxConstArguments; // Image support fields diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp index 824f713afb..91b3728019 100644 --- a/rocclr/runtime/device/pal/paldevice.cpp +++ b/rocclr/runtime/device/pal/paldevice.cpp @@ -331,7 +331,7 @@ void NullDevice::fillDeviceInfo( //! should be able to create a view with 256 bytes alignement info_.memBaseAddrAlign_ = 8 * MemBaseAlignment; - info_.maxConstantBufferSize_ = 64 * Ki; + info_.maxConstantBufferSize_ = info_.maxMemAllocSize_; info_.maxConstantArgs_ = MaxConstArguments; // Image support fields diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp index 50f3d60ff4..5109e3fbc7 100644 --- a/rocclr/runtime/device/rocm/rocdevice.cpp +++ b/rocclr/runtime/device/rocm/rocdevice.cpp @@ -810,7 +810,7 @@ Device::populateOCLDeviceConstants() info_.minDataTypeAlignSize_ = sizeof(cl_long16); info_.maxConstantArgs_ = 8; - info_.maxConstantBufferSize_ = 64 * 1024; + info_.maxConstantBufferSize_ = info_.maxMemAllocSize_; info_.localMemType_ = CL_LOCAL; info_.errorCorrectionSupport_ = false; info_.profilingTimerResolution_ = 1;