You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sch/util.jl
+16-12Lines changed: 16 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -368,9 +368,7 @@ end
368
368
369
369
"Like `sum`, but replaces `nothing` entries with the average of non-`nothing` entries."
370
370
functionimpute_sum(xs)
371
-
length(xs) ==0&&return0
372
-
373
-
total =zero(eltype(xs))
371
+
total =0
374
372
nothing_count =0
375
373
something_count =0
376
374
for x in xs
@@ -382,7 +380,8 @@ function impute_sum(xs)
382
380
end
383
381
end
384
382
385
-
total + nothing_count * total / something_count
383
+
something_count ==0&&return0
384
+
return total + nothing_count * total / something_count
386
385
end
387
386
388
387
"Collects all arguments for `task`, converting Thunk inputs to Chunks."
@@ -412,15 +411,20 @@ function estimate_task_costs(state, procs, task, inputs)
412
411
end
413
412
end
414
413
415
-
# Estimate network transfer costs based on data size
416
-
# N.B. `affinity(x)` really means "data size of `x`"
417
-
# N.B. We treat same-worker transfers as having zero transfer cost
418
-
#TODO: For non-Chunk, model cost from scheduler to worker
419
-
#TODO: Measure and model processor move overhead
420
-
transfer_costs =Dict(proc=>impute_sum([affinity(chunk)[2] for chunk infilter(c->get_parent(processor(c))!=get_parent(proc), chunks)]) for proc in procs)
0 commit comments