Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit a257435

Browse files
committed
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
1 parent 824c2ca commit a257435

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

device/rocm/rocdevice.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,13 +1142,12 @@ bool Device::populateOCLDeviceConstants() {
11421142

11431143
freeMem_ = info_.globalMemSize_;
11441144

1145-
// Make sure the max allocation size is not larger than the available
1146-
// memory size.
1145+
// Make sure the max allocation size is not larger than the available memory size.
11471146
info_.maxMemAllocSize_ = std::min(info_.maxMemAllocSize_, info_.globalMemSize_);
1147+
info_.maxMemAllocSize_ = amd::alignDown(info_.maxMemAllocSize_, sizeof(uint64_t));
11481148

1149-
/*make sure we don't run anything over 8 params for now*/
1150-
info_.maxParameterSize_ = 1024; // [TODO]: CAL stack values: 1024*
1151-
// constant
1149+
// make sure we don't run anything over 8 params for now
1150+
info_.maxParameterSize_ = 1024;
11521151

11531152
uint32_t max_work_group_size = 0;
11541153
if (HSA_STATUS_SUCCESS !=

0 commit comments

Comments
 (0)