diff --git a/checkin_notes b/checkin_notes index 68e42b6b75..6b908d8f5d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4217,3 +4217,13 @@ Bernd 6 Jun 2012 sched/ sched_version.cpp + +Bernd 6 Jun 2012 + - scheduler: minor fixes to plan_clas_spec: + - consistently accept both 'ati' and 'amd' for AMD/ATI plan classes + - in OpenCL plan classes always use device memory reported via OpenCL + (might be different e.g. from what's available/reported via CUDA) + - comment formatting + + sched/ + plan_class_spec.cpp diff --git a/sched/plan_class_spec.cpp b/sched/plan_class_spec.cpp index 0b20ba4427..08114b9fef 100644 --- a/sched/plan_class_spec.cpp +++ b/sched/plan_class_spec.cpp @@ -228,7 +228,7 @@ bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu) { // AMD // - if (!strcmp(gpu_type, "amd")) { + if (!strcmp(gpu_type, "amd") || !strcmp(gpu_type, "ati")) { COPROC_ATI& cp = sreq.coprocs.ati; cpp = &cp; @@ -271,9 +271,10 @@ bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu) { ); } } + + // NVIDIA + // } else if (!strcmp(gpu_type, "nvidia")) { - // NVIDIA - // COPROC_NVIDIA& cp = sreq.coprocs.nvidia; cpp = &cp; @@ -359,6 +360,8 @@ bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu) { } return false; } + + gpu_ram = cpp->opencl_prop.global_mem_size; } // general GPU @@ -376,8 +379,6 @@ bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu) { return false; } - - // (display) driver version if (min_driver_version && driver_version) { if (min_driver_version > driver_version) { @@ -429,12 +430,15 @@ bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu) { hu.avg_ncpus = avg_ncpus; } - if (!strcmp(gpu_type, "ati")) { + if (!strcmp(gpu_type, "amd") || !strcmp(gpu_type, "ati")) { hu.natis = gpu_usage; } else if (!strcmp(gpu_type, "nvidia")) { hu.ncudas = gpu_usage; } - } else { // CPU only + + // CPU only + // + } else { if (avg_ncpus) { hu.avg_ncpus = avg_ncpus; } else {