From d886bbdb2cfdec3dc2b50aef01b45cd25baca88a Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 21 Aug 2018 16:16:14 -0400 Subject: [PATCH] P4 to Git Change 1596548 by axie@axie_win_opencl_laptop on 2018/08/21 15:55:23 SWDEV-161959 - [ROCm QA][RAVEN] QCDGPU-S test is having ERROR -61: (clCreateKernel failed) on RAVEN SWDEV-161983 - [ROCm QA][RAVEN] Cachebench test is failing with CL_INVALID_BUFFER_SIZE issue SWDEV-161978 - [ROCm QA][RAVEN] PCIeBW is failing on -with error : 61, OpenCL error creating buffer ! SWDEV-161962 - [ROCm QA][RAVEN] rodinia->nw test has ERROR: clCreateBuffer input_item_set (size:67125249) => -61 - We make the global memory size at least 1G byte. This is to avoid issue/regression if sysconf API misbehaves. ReviewBoardURL = http://ocltc.amd.com/reviews/r/15660/ Tests: 1. ocltst -m oclruntime.so -A oclruntime.exclude - PASS except SVM test (non regression) 2. TeamCity presubmission test (OpenCL) - PASS 3. Run test qcdgpu-s.sh : PASS 4. Run test cachebench-ocl : PASS 5. Run test PCIeBandwidth -c 0 -g 0 : PASS 6. Run test Rodinia/opencl/nw/run : PASS Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#98 edit --- rocclr/runtime/device/rocm/rocdevice.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp index 0baad36ad4..a874a36372 100644 --- a/rocclr/runtime/device/rocm/rocdevice.cpp +++ b/rocclr/runtime/device/rocm/rocdevice.cpp @@ -963,6 +963,7 @@ bool Device::populateOCLDeviceConstants() { // We suppose half of physical memory can be used by GPU in APU system info_.globalMemSize_ = cl_ulong(sysconf(_SC_PAGESIZE)) * cl_ulong(sysconf(_SC_PHYS_PAGES)) / 2; + info_.globalMemSize_ = std::max(info_.globalMemSize_, cl_ulong(1 * Gi)); info_.maxMemAllocSize_ = cl_ulong(info_.globalMemSize_ * std::min(GPU_SINGLE_ALLOC_PERCENT, 100u) / 100u);