| 39 | |
| 40 | == Defining GPU plan classes == |
| 41 | |
| 42 | To define a new NVIDIA/CUDA plan class, add a new clause |
| 43 | to '''app_plan_cuda()''' in sched/sched_customize.cpp. |
| 44 | For example, the plan class '''cuda23''' is defined by: |
| 45 | |
| 46 | {{{ |
| 47 | ... |
| 48 | if (!strcmp(plan_class, "cuda23")) { |
| 49 | if (!cuda_check(c, hu, |
| 50 | 100, // minimum compute capability (1.0) |
| 51 | 200, // max compute capability (2.0) |
| 52 | 2030, // min CUDA version (2.3) |
| 53 | 19500, // min display driver version (195.00) |
| 54 | 384*MEGA, // min video RAM |
| 55 | 1., // # of GPUs used (may be fractional, or an integer > 1) |
| 56 | .01, // fraction of FLOPS done by the CPU |
| 57 | .21 // estimated GPU efficiency (actual/peak FLOPS) |
| 58 | )) { |
| 59 | return false; |
| 60 | } |
| 61 | } |
| 62 | }}} |
| 63 | |
| 64 | To define a new ATI/CAL plan class, add a new clause |
| 65 | to '''app_plan_ati()'''. |
| 66 | For example: |
| 67 | {{{ |
| 68 | if (!strcmp(plan_class, "ati14")) { |
| 69 | if (!ati_check(c, hu, |
| 70 | 1004000, // min display driver version (10.4) |
| 71 | false, // require libraries named "ati", not "amd" |
| 72 | 384*MEGA, // min video RAM |
| 73 | 1., // # of GPUs used (may be fractional, or an integer > 1) |
| 74 | .01, // fraction of FLOPS done by the CPU |
| 75 | .21 // estimated GPU efficiency (actual/peak FLOPS) |
| 76 | )) { |
| 77 | return false; |
| 78 | } |
| 79 | } |
| 80 | }}} |
| 81 | |
| 82 | To define a new OpenCL plan class, add a new clause to |
| 83 | '''app_plan_opencl()'''. |
| 84 | For example: |
| 85 | |
| 86 | {{{ |
| 87 | if (!strcmp(plan_class, "opencl_nvidia_101")) { |
| 88 | return opencl_check( |
| 89 | c, hu, |
| 90 | 101, // OpenCL version (1.1) |
| 91 | 256*MEGA, // min video RAM |
| 92 | 1, // # of GPUs used |
| 93 | .1, // fraction of FLOPS done by the CPU |
| 94 | .21 // estimated GPU efficiency (actual/peak FLOPS) |
| 95 | ); |
| 96 | } |
| 97 | }}} |