diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2014-10-19 12:17:47 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2014-10-19 12:17:47 -0400 |
commit | 3df8b44740e89bf9435cdc9627d752c971354b11 (patch) | |
tree | 16a58fb974b6c8e375a41188514ef4a6b02218a0 | |
parent | f5f688330cf1c70ad79240108bc96fc98fe42b41 (diff) |
Always do ILP sched test for P2P.
-rw-r--r-- | rtss14/chains.py | 2 | ||||
-rwxr-xr-x | rtss14/rtss14.py | 15 |
2 files changed, 11 insertions, 6 deletions
diff --git a/rtss14/chains.py b/rtss14/chains.py index fde75c3..f4bfdda 100644 --- a/rtss14/chains.py +++ b/rtss14/chains.py | |||
@@ -3746,8 +3746,6 @@ def getBlockingChainSolver(nce, ngpu, rho, polluters, worst_case, chunksz, gpu_x | |||
3746 | name = 'ce%d_g%d_r%d_p%d_w%d_chk%d' % key | 3746 | name = 'ce%d_g%d_r%d_p%d_w%d_chk%d' % key |
3747 | slvr = create_solver(name, in_template, out_template, incost, outcost, migcost) | 3747 | slvr = create_solver(name, in_template, out_template, incost, outcost, migcost) |
3748 | cached_solvers[key] = slvr | 3748 | cached_solvers[key] = slvr |
3749 | if slvr is not None: | ||
3750 | print 'created solver for %s' % (str(key)) | ||
3751 | return slvr | 3749 | return slvr |
3752 | 3750 | ||
3753 | #def TEST_getBlockingChainSolver(nce, ngpu, rho): | 3751 | #def TEST_getBlockingChainSolver(nce, ngpu, rho): |
diff --git a/rtss14/rtss14.py b/rtss14/rtss14.py index 8bc8324..9734cf8 100755 --- a/rtss14/rtss14.py +++ b/rtss14/rtss14.py | |||
@@ -647,13 +647,20 @@ def process_dp(_dp): | |||
647 | ts = create_gpu_task_set(dp, overheads) | 647 | ts = create_gpu_task_set(dp, overheads) |
648 | 648 | ||
649 | # vvvvvvvvvvvvvvvv CHECK SCHEDULABILITY vvvvvvvvvvvvvvvv | 649 | # vvvvvvvvvvvvvvvv CHECK SCHEDULABILITY vvvvvvvvvvvvvvvv |
650 | is_sched, processed_ts = is_schedulable(ts, dp, overheads) | 650 | if thesolver is None: |
651 | is_sched, processed_ts = is_schedulable(ts, dp, overheads) | ||
652 | else: | ||
653 | ts_for_ilp = ts.copy() | ||
654 | is_sched, processed_ts = is_schedulable(ts, dp, overheads) | ||
651 | 655 | ||
652 | # try again with the blocking heuristic | ||
653 | if not is_sched and thesolver is not None: | ||
654 | dp.solver = thesolver | 656 | dp.solver = thesolver |
655 | is_sched, processed_ts = is_schedulable(ts, dp, overheads) | 657 | is_sched_ilp, processed_ts_ilp = is_schedulable(ts_for_ilp, dp, overheads) |
656 | dp.solver = None | 658 | dp.solver = None |
659 | |||
660 | # pick ilp solution if it is better | ||
661 | if (not is_sched and is_sched_ilp) or (is_sched and is_sched_ilp and processed_ts.max_ptardiness() > processed_ts_ilp.max_ptardiness()): | ||
662 | is_sched = is_sched_ilp | ||
663 | processed_ts = processed_ts_ilp | ||
657 | # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 664 | # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
658 | 665 | ||
659 | avg_sched = update_mean(avg_sched, samples, is_sched) | 666 | avg_sched = update_mean(avg_sched, samples, is_sched) |