Changes between Version 14 and Version 15 of GpuWorkFetch
- Timestamp:
- Dec 26, 2008, 1:09:10 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GpuWorkFetch
v14 v15 186 186 187 187 void send_req(p) 188 req.cpu_req_seconds = cpu_work_fetch.shortfall ;188 req.cpu_req_seconds = cpu_work_fetch.shortfall 189 189 req.cpu_req_ninstances = cpu_work_fetch.nidle 190 req.cuda_req_seconds = cuda_work_fetch.shortfall; 191 192 for prior = NEED_NOW, NEED 193 for each coproc C (in decreasing order of importance) 194 p = C.work_fetch.select_proj(prior, msg); 195 if p 196 put msg in req message 197 send_req(p) 198 return 199 else 200 p = cpu_work_fetch(prior) 201 if p 202 send_req(p) 203 return 190 req.cuda_req_seconds = cuda_work_fetch.shortfall 191 req.cuda_req_ninstances = cuda_work_fetch.nidle 192 req.work_req_seconds = max(req.cpu_req_seconds, req.cuda_req_seconds) 193 204 194 }}} 205 195 206 196 === Handling scheduler reply === 207 197 208 if request. 198 if no jobs returned 199 double backoff for each requested PRSC 209 200 210 201 == Scheduler changes == 211 202 {{{ 212 203 global vars 213 214 204 have_cpu_app_versions 205 have_cuda_app_versions 215 206 per-req vars 216 217 218 219 220 221 222 207 bool coproc_request 208 ncpu_jobs_sending 209 ncuda_jobs_sending 210 ncpu_seconds_to_fill 211 ncuda_seconds_to_fill 212 seconds_to_fill 213 (backwards compat; used if !coproc_request) 223 214 overall startup 224 215 scan app versions, set have_x vars 225 216 req startup 226 227 217 if send_only_cpu and no CPU app versions, don't send work 218 if send_only_cuda and no CUDA app versions, don't send work 228 219 work_needed() 229 230 231 232 233 220 need_more_cpu_jobs = 221 n_cpu_jobs_sending < ninstances_cpu 222 or cpu_seconds_to_fill > 0 223 same for cuda 224 return false if don't need more CPU or more CUDA 234 225 get_app_version 235 236 226 if send_only_cpu, ignore CUDA versions 227 if send_only_cuda, ignore CPU versions 237 228 when commit a job 238 239 240 241 }}} 229 update n*_jobs_sending, 230 n*_seconds_to_fill, 231 seconds_to_fill 232 }}}