mirror of https://github.com/BOINC/boinc.git
scheduler: fix bug that prevented Intel GPU work from being sent to anonymous platform clients
This commit is contained in:
parent
7125028c15
commit
feb2f1971d
|
@ -905,4 +905,10 @@ const char* proc_type_name(int pt) {
|
|||
return "unknown";
|
||||
}
|
||||
|
||||
|
||||
int coproc_type_name_to_num(const char* name) {
|
||||
if (!strcmp(name, "CUDA")) return PROC_TYPE_NVIDIA_GPU;
|
||||
if (!strcmp(name, "NVIDIA")) return PROC_TYPE_NVIDIA_GPU;
|
||||
if (!strcmp(name, "ATI")) return PROC_TYPE_AMD_GPU;
|
||||
if (!strcmp(name, "intel_gpu")) return PROC_TYPE_INTEL_GPU;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ extern const char* proc_type_name(int);
|
|||
// user-readable name
|
||||
extern const char* proc_type_name_xml(int);
|
||||
// name used in XML and COPROC::type
|
||||
extern int coproc_type_name_to_num(const char* name);
|
||||
|
||||
// deprecated, but keep for simplicity
|
||||
#define GPU_TYPE_NVIDIA proc_type_name_xml(PROC_TYPE_NVIDIA_GPU)
|
||||
|
|
|
@ -93,14 +93,15 @@ int CLIENT_APP_VERSION::parse(XML_PARSER& xp) {
|
|||
COPROC_REQ coproc_req;
|
||||
int retval = coproc_req.parse(xp);
|
||||
if (!retval) {
|
||||
host_usage.gpu_usage = coproc_req.count;
|
||||
if (!strcmp(coproc_req.type, "CUDA") || !strcmp(coproc_req.type, "NVIDIA")) {
|
||||
host_usage.proc_type = PROC_TYPE_NVIDIA_GPU;
|
||||
} else if (!strcmp(coproc_req.type, "ATI")) {
|
||||
host_usage.proc_type = PROC_TYPE_AMD_GPU;
|
||||
} else if (!strcmp(coproc_req.type, "INTEL")) {
|
||||
host_usage.proc_type = PROC_TYPE_INTEL_GPU;
|
||||
int rt = coproc_type_name_to_num(coproc_req.type);
|
||||
if (!rt) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"UNKNOWN COPROC TYPE %s\n", coproc_req.type
|
||||
);
|
||||
continue;
|
||||
}
|
||||
host_usage.proc_type = rt;
|
||||
host_usage.gpu_usage = coproc_req.count;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue