- scheduler and web: store OpenCL version along with other GPU info

in host.serialnum.  Display it on web.
This commit is contained in:
David Anderson 2013-02-19 22:24:51 -08:00 committed by Oliver Bock
parent 47d3c9ffff
commit b95e0dc728
2 changed files with 22 additions and 6 deletions

View File

@ -276,6 +276,19 @@ function gpu_desc($x) {
}
}
}
if (array_key_exists(5, $d)) {
if ($d[5] != "" && $d[5] != 0) {
if (strchr($d[5], '.')) {
$str .= " OpenCL: ".$d[5];
} else {
$i = (int)$d[5];
$maj = (int)($i/100);
$min = $i%100;
$str .= sprintf(" OpenCL: %d.%02d", $maj, $min);
}
}
}
}
if (!$str) $str = "---";

View File

@ -313,22 +313,25 @@ void COPROCS::summary_string(char* buf, int len) {
strcpy(buf, "");
if (nvidia.count) {
int mem = (int)(nvidia.prop.totalGlobalMem/MEGA);
sprintf(buf2, "[CUDA|%s|%d|%dMB|%d]",
nvidia.prop.name, nvidia.count, mem, nvidia.display_driver_version
sprintf(buf2, "[CUDA|%s|%d|%dMB|%d|%d]",
nvidia.prop.name, nvidia.count, mem, nvidia.display_driver_version,
nvidia.opencl_prop.opencl_device_version_int
);
strlcat(buf, buf2, len);
}
if (ati.count) {
sprintf(buf2,"[CAL|%s|%d|%dMB|%s]",
ati.name, ati.count, ati.attribs.localRAM, ati.version
sprintf(buf2,"[CAL|%s|%d|%dMB|%s|%d]",
ati.name, ati.count, ati.attribs.localRAM, ati.version,
ati.opencl_prop.opencl_device_version_int
);
strlcat(buf, buf2, len);
}
if (intel_gpu.count) {
sprintf(buf2,"[INTEL|%s|%d|%dMB|%s]",
sprintf(buf2,"[INTEL|%s|%d|%dMB|%s|%d]",
intel_gpu.name, intel_gpu.count,
(int)(intel_gpu.opencl_prop.global_mem_size/MEGA),
intel_gpu.version
intel_gpu.version,
intel_gpu.opencl_prop.opencl_device_version_int
);
strlcat(buf, buf2, len);
}