client: If CUDA driver 6.5 or later is installed, prevent use of NVIDIA GPUs with Compute Capability < 2.0 and show explanation in Event Log and Notices.

This commit is contained in:
Charlie Fenton 2014-10-25 03:55:29 -07:00
parent 6eabd34068
commit 4726923ef8
2 changed files with 16 additions and 0 deletions

View File

@ -200,6 +200,14 @@ void COPROCS::correlate_gpus(
"CUDA: NVIDIA GPU %d (not used): %s",
nvidia_gpus[i].device_num, buf
);
if ((nvidia_gpus[i].cuda_version >= 6050) &&
nvidia_gpus[i].prop.major < 2) {
msg_printf(NULL, MSG_USER_ALERT, "NVIDIA GPU %d: %s %s",
nvidia_gpus[i].device_num, nvidia_gpus[i].prop.name,
_("cannot be used for CUDA or OpenCL computation with CUDA driver 6.5 or later")
);
}
break;
}
descs.push_back(string(buf2));

View File

@ -441,6 +441,11 @@ void COPROC_NVIDIA::correlate(
bool first = true;
for (i=0; i<nvidia_gpus.size(); i++) {
if (in_vector(nvidia_gpus[i].device_num, ignore_devs)) continue;
if ((cuda_version >= 6050) && nvidia_gpus[i].prop.major < 2) {
// Can't use GPUs with compute capability < 2 with CUDA drivers >= 6.5.x
nvidia_gpus[i].is_used = COPROC_UNUSED;
continue;
}
if (first) {
*this = nvidia_gpus[i];
first = false;
@ -460,6 +465,9 @@ void COPROC_NVIDIA::correlate(
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 (nvidia_gpus[i].is_used == COPROC_UNUSED) {
// Can't use GPUs with compute capability < 2 with CUDA drivers >= 6.5.x
continue;
} 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;