Changes between Version 14 and Version 15 of GpuWorkFetch


Ignore:
Timestamp:
Dec 26, 2008, 1:09:10 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GpuWorkFetch

    v14 v15  
    186186
    187187void send_req(p)
    188    req.cpu_req_seconds = cpu_work_fetch.shortfall;
     188   req.cpu_req_seconds = cpu_work_fetch.shortfall
    189189   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
    204194}}}
    205195
    206196=== Handling scheduler reply ===
    207197
    208 if request.
     198if no jobs returned
     199   double backoff for each requested PRSC
    209200
    210201== Scheduler changes ==
    211202{{{
    212203global vars
    213         have_cpu_app_versions
    214         have_cuda_app_versions
     204   have_cpu_app_versions
     205   have_cuda_app_versions
    215206per-req vars
    216         bool coproc_request
    217         ncpu_jobs_sending
    218         ncuda_jobs_sending
    219         ncpu_seconds_to_fill
    220         ncuda_seconds_to_fill
    221         seconds_to_fill
    222                 (backwards compat; used if !coproc_request)
     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)
    223214overall startup
    224         scan app versions, set have_x vars
     215   scan app versions, set have_x vars
    225216req startup
    226         if send_only_cpu and no CPU app versions, don't send work
    227         if send_only_cuda and no CUDA app versions, don't send work
     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
    228219work_needed()
    229         need_more_cpu_jobs =
    230                 n_cpu_jobs_sending < ninstances_cpu
    231                 or cpu_seconds_to_fill > 0
    232         same for cuda
    233         return false if don't need more CPU or more CUDA
     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
    234225get_app_version
    235         if send_only_cpu, ignore CUDA versions
    236         if send_only_cuda, ignore CPU versions
     226   if send_only_cpu, ignore CUDA versions
     227   if send_only_cuda, ignore CPU versions
    237228when commit a job
    238         update n*_jobs_sending,
    239                 n*_seconds_to_fill,
    240                 seconds_to_fill
    241 }}}
     229   update n*_jobs_sending,
     230      n*_seconds_to_fill,
     231      seconds_to_fill
     232}}}