From 4901e27282f3f6a062b639c0ad097eb92542a541 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 26 Apr 2014 09:05:00 -0700 Subject: [PATCH] client: don't include GPUs that lack OpenCL/Cal/CUDA when main GPU has it E.g.: if the "best" AMD GPU can do OpenCL, don't include AMD GPUs that can't, even if use_all_gpus is set. Otherwise lots of jobs will error out. --- client/gpu_amd.cpp | 4 ++++ client/gpu_nvidia.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/client/gpu_amd.cpp b/client/gpu_amd.cpp index e8c7008457..e89640b22c 100644 --- a/client/gpu_amd.cpp +++ b/client/gpu_amd.cpp @@ -404,6 +404,10 @@ void COPROC_ATI::correlate( ati_gpus[i].description(buf, sizeof(buf)); if (in_vector(ati_gpus[i].device_num, ignore_devs)) { ati_gpus[i].is_used = COPROC_IGNORED; + } else if (this->have_opencl && !ati_gpus[i].have_opencl) { + ati_gpus[i].is_used = COPROC_UNUSED; + } else if (this->have_cal && !ati_gpus[i].have_cal) { + ati_gpus[i].is_used = COPROC_UNUSED; } else if (use_all || !ati_compare(ati_gpus[i], *this, true)) { device_nums[count] = ati_gpus[i].device_num; count++; diff --git a/client/gpu_nvidia.cpp b/client/gpu_nvidia.cpp index 64a04f1ff6..dc091024a7 100644 --- a/client/gpu_nvidia.cpp +++ b/client/gpu_nvidia.cpp @@ -393,6 +393,10 @@ void COPROC_NVIDIA::correlate( for (i=0; ihave_opencl && !nvidia_gpus[i].have_opencl) { + nvidia_gpus[i].is_used = COPROC_UNUSED; + } else if (this->have_cuda && !nvidia_gpus[i].have_cuda) { + nvidia_gpus[i].is_used = COPROC_UNUSED; } else if (use_all || !nvidia_compare(nvidia_gpus[i], *this, true)) { device_nums[count] = nvidia_gpus[i].device_num; pci_infos[count] = nvidia_gpus[i].pci_info;