diff --git a/checkin_notes b/checkin_notes index d851e18784..3d95f53543 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1795,3 +1795,10 @@ David 16 Feb 2012 vda/ sched_vda.cpp makefile + +Charlie 16 Feb 2012 + - client: Always use GPU model name from OpenCL if available for ATI / AMD + GPUs because (we believe) it is more reliable and user-friendly. + + client/ + coproc_detect.cpp diff --git a/client/coproc_detect.cpp b/client/coproc_detect.cpp index 1ee63d2e34..58ab71f8f7 100644 --- a/client/coproc_detect.cpp +++ b/client/coproc_detect.cpp @@ -67,6 +67,8 @@ void segv_handler(int) { vector ati_gpus; vector nvidia_gpus; +vector nvidia_opencls; +vector ati_opencls; void COPROCS::get( @@ -74,6 +76,8 @@ void COPROCS::get( vector& ignore_nvidia_dev, vector& ignore_ati_dev ) { + unsigned int i; + char buf[256], buf2[256]; #ifdef _WIN32 try { @@ -116,8 +120,58 @@ void COPROCS::get( signal(SIGSEGV, old_sig); #endif + for (i=0; i nvidia_opencls; - vector ati_opencls; COPROC_NVIDIA nvidia_temp; COPROC_ATI ati_temp; - unsigned int i; int current_CUDA_index; char buf[256]; @@ -360,7 +411,7 @@ strcpy(prop.opencl_driver_version, "CLH 1.0"); ) { prop.device_num = (int)(ati_opencls.size()); prop.opencl_device_index = device_index; - + #ifdef __APPLE__ // Work around a bug in OpenCL which returns only // 1/2 of total global RAM size. @@ -377,7 +428,12 @@ strcpy(prop.opencl_driver_version, "CLH 1.0"); } #endif - if (!ati.have_cal) { + if (ati.have_cal) { + // 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); + } else { COPROC_ATI c; c.opencl_prop = prop; c.set_peak_flops(); @@ -409,13 +465,6 @@ strcpy(prop.opencl_driver_version, "CLH 1.0"); strcpy(nvidia.prop.name, prop.name); } - // Create descriptions for OpenCL NVIDIA GPUs - // - for (i=0; i