From 61c85339c3af4eac932ee7c3a68def817002d0bb Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Fri, 11 Sep 2020 12:23:14 -0400 Subject: [PATCH] SWDEV-252095 - Fix progvar_prog_scope_misc test Aborted (core dumped) The progvar_prog_scope_misc test expects CL_DEVICE_MAX_MEM_ALLOC_SIZE to be multiple of integer. Change-Id: Ic0690f5ab06ffa3feafb718beabbcf83ab53978c [ROCm/clr commit: 740f1ba0aa58966c77239b54ef87bdddcee0d205] --- projects/clr/rocclr/device/rocm/rocdevice.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/projects/clr/rocclr/device/rocm/rocdevice.cpp b/projects/clr/rocclr/device/rocm/rocdevice.cpp index 058c98807d..d5ccfc53b8 100755 --- a/projects/clr/rocclr/device/rocm/rocdevice.cpp +++ b/projects/clr/rocclr/device/rocm/rocdevice.cpp @@ -1142,13 +1142,12 @@ bool Device::populateOCLDeviceConstants() { freeMem_ = info_.globalMemSize_; - // Make sure the max allocation size is not larger than the available - // memory size. + // Make sure the max allocation size is not larger than the available memory size. info_.maxMemAllocSize_ = std::min(info_.maxMemAllocSize_, info_.globalMemSize_); + info_.maxMemAllocSize_ = amd::alignDown(info_.maxMemAllocSize_, sizeof(uint64_t)); - /*make sure we don't run anything over 8 params for now*/ - info_.maxParameterSize_ = 1024; // [TODO]: CAL stack values: 1024* - // constant + // make sure we don't run anything over 8 params for now + info_.maxParameterSize_ = 1024; uint32_t max_work_group_size = 0; if (HSA_STATUS_SUCCESS !=