Unverified Commit bf5f2fce authored by Tristan Olive's avatar Tristan Olive Committed by GitHub
Browse files

Merge pull request #3231 from BOINC/dpa_gpu_desc

boinccmd: show GPU info in --get_host_info
parents 4da81d40 adfd50e8
......@@ -238,7 +238,7 @@ void HOST_INFO::print() {
printf(" CPU model: %s\n", p_model);
printf(" CPU FP OPS: %f\n", p_fpops);
printf(" CPU int OPS: %f\n", p_iops);
printf(" CPU mem BW: %f\n", p_membw);
//printf(" CPU mem BW: %f\n", p_membw);
printf(" OS name: %s\n", os_name);
printf(" OS version: %s\n", os_version);
printf(" mem size: %f\n", m_nbytes);
......@@ -246,6 +246,58 @@ void HOST_INFO::print() {
printf(" swap size: %f\n", m_swap);
printf(" disk size: %f\n", d_total);
printf(" disk free: %f\n", d_free);
// Show GPU info.
// This is harder than it should be,
// because the structures aren't populated like they were
// at GPU detection time.
// Would be better for the client to export the description strings.
//
char buf[256];
COPROC_NVIDIA& cn = coprocs.nvidia;
if (cn.count) {
cn.description(buf, sizeof(buf));
printf(" NVIDIA GPU: %s\n", buf);
if (cn.count > 1) {
printf(" Count: %d\n", cn.count);
}
if (cn.have_opencl) {
cn.opencl_prop.is_used = COPROC_USED;
cn.opencl_prop.peak_flops = cn.peak_flops;
cn.opencl_prop.opencl_available_ram = cn.available_ram;
cn.opencl_prop.description(buf, sizeof(buf), "NVIDIA");
printf(" %s\n", buf);
}
}
COPROC_ATI &ca = coprocs.ati;
if (ca.count) {
ca.description(buf, sizeof(buf));
printf(" AMD GPU: %s\n", buf);
if (ca.count > 1) {
printf(" Count: %d\n", ca.count);
}
if (ca.have_opencl) {
ca.opencl_prop.peak_flops = ca.peak_flops;
ca.opencl_prop.opencl_available_ram = ca.available_ram;
ca.opencl_prop.is_used = COPROC_USED;
ca.opencl_prop.description(buf, sizeof(buf), "AMD");
printf(" %s\n", buf);
}
}
COPROC_INTEL &ci = coprocs.intel_gpu;
if (ci.count) {
printf(" Intel GPU\n");
if (ci.count > 1) {
printf(" Count: %d\n", ci.count);
}
if (ci.have_opencl) {
ci.opencl_prop.peak_flops = ci.peak_flops;
ci.opencl_prop.opencl_available_ram = ci.opencl_prop.global_mem_size;
ci.opencl_prop.is_used = COPROC_USED;
ci.opencl_prop.description(buf, sizeof(buf), "Intel GPU");
printf(" %s\n", buf);
}
}
}
void SIMPLE_GUI_INFO::print() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment