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;