From df9357b4566942ae7ab413633dba6ec5108a4089 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 23 Feb 2012 00:42:04 +0000 Subject: [PATCH] client: When available, use total RAM value from CAL for all ATI OpenCL GPUs, not only for the "best" GPU svn path=/trunk/boinc/; revision=25319 --- checkin_notes | 8 ++++++++ client/coproc_detect.cpp | 15 ++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index 134934c40b..1c9383eca4 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2087,3 +2087,11 @@ Charlie 22 Feb 2012 api/ macglutfix.m + +Charlie 22 Feb 2012 + - client: When available, use total RAM value from CAL for all ATI + OpenCL GPUs, not only for the "best" GPU, so the descriptions + show this value. + + client/ + coproc_detect.cpp diff --git a/client/coproc_detect.cpp b/client/coproc_detect.cpp index a3dc9fbc8d..021200a578 100644 --- a/client/coproc_detect.cpp +++ b/client/coproc_detect.cpp @@ -433,11 +433,18 @@ strcpy(prop.opencl_driver_version, "CLH 1.0"); #endif if (ati.have_cal) { - if (prop.device_num < (int)(ati_gpus.size())) { + if (prop.device_num < (int)(ati_gpus.size())) { // Always use GPU model name from OpenCL if available for ATI / AMD // GPUs because (we believe) it is more reliable and user-friendly. // Assumes OpenCL and CAL return the devices in the same order strcpy(ati_gpus[prop.device_num].name, prop.name); + + // Work around a bug in OpenCL which returns only + // 1/2 of total global RAM size: use the value from CAL. + // This bug applies only to ATI GPUs, not to NVIDIA + // See also further workaround code for Macs. + // + prop.global_mem_size = ati_gpus[prop.device_num].attribs.localRAM * MEGA; } else { if (log_flags.coproc_debug) { msg_printf(0, MSG_INFO, @@ -481,12 +488,6 @@ strcpy(prop.opencl_driver_version, "CLH 1.0"); if (ati.have_cal) { // If CAL already found the "best" CAL GPU ati.merge_opencl(ati_opencls, ignore_ati_dev); - // Work around a bug in OpenCL which returns only - // 1/2 of total global RAM size: use the value from CAL. - // This bug applies only to ATI GPUs, not to NVIDIA - // See also further workaround code for Macs. - // - ati.opencl_prop.global_mem_size = ati.attribs.localRAM * MEGA; } else { ati.find_best_opencls(use_all, ati_opencls, ignore_ati_dev); ati.attribs.localRAM = ati.opencl_prop.global_mem_size/MEGA;