From a851cc152caf88ca950487c58268ed61dd211d28 Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 18 Sep 2017 14:15:44 -0400
Subject: [PATCH] P4 to Git Change 1460028 by wchau@wchau_OCL_boltzmann on
2017/09/18 14:03:40
SWDEV-111439 - Add query for preferred constant size
- fixed a mistake of using 64KiB for the size, which should be 16KiB.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#576 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#62 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#63 edit
---
rocclr/runtime/device/gpu/gpudevice.cpp | 2 +-
rocclr/runtime/device/pal/paldevice.cpp | 2 +-
rocclr/runtime/device/rocm/rocdevice.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp
index 44875714c1..6919f7701c 100644
--- a/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -434,7 +434,7 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
//! should be able to create a view with 256 bytes alignement
info_.memBaseAddrAlign_ = 8 * MemBaseAlignment;
- info_.preferredConstantBufferSize_ = 64 * Ki;
+ info_.preferredConstantBufferSize_ = 16 * Ki;
info_.maxConstantBufferSize_ = (settings().ciPlus_) ? info_.maxMemAllocSize_ : 64 * Ki;
info_.maxConstantArgs_ = MaxConstArguments;
diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp
index 85e86b2ddb..768c25bec0 100644
--- a/rocclr/runtime/device/pal/paldevice.cpp
+++ b/rocclr/runtime/device/pal/paldevice.cpp
@@ -377,7 +377,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
//! should be able to create a view with 256 bytes alignement
info_.memBaseAddrAlign_ = 8 * MemBaseAlignment;
- info_.preferredConstantBufferSize_ = 64 * Ki;
+ info_.preferredConstantBufferSize_ = 16 * Ki;
info_.maxConstantBufferSize_ = info_.maxMemAllocSize_;
info_.maxConstantArgs_ = MaxConstArguments;
diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp
index 648f9e3804..691831c2ab 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -933,7 +933,7 @@ bool Device::populateOCLDeviceConstants() {
info_.minDataTypeAlignSize_ = sizeof(cl_long16);
info_.maxConstantArgs_ = 8;
- info_.preferredConstantBufferSize_ = 64 * Ki;
+ info_.preferredConstantBufferSize_ = 16 * Ki;
info_.maxConstantBufferSize_ = info_.maxMemAllocSize_;
info_.localMemType_ = CL_LOCAL;
info_.errorCorrectionSupport_ = false;