diff options
| author | Glenn Elliott <gelliott@cs.unc.edu> | 2014-01-29 15:54:41 -0500 |
|---|---|---|
| committer | Glenn Elliott <gelliott@cs.unc.edu> | 2014-01-29 15:54:41 -0500 |
| commit | f21e72b2d22679154500e64bde37b83b3e587488 (patch) | |
| tree | 51bc98a0e68c8df51d6f21cea75865b20a3c7dd4 | |
| parent | 38524b6334a2396a4011473ab4c803c687677611 (diff) | |
Generate only schedulable task sets.
| -rw-r--r-- | gen/edf_generators.py | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/gen/edf_generators.py b/gen/edf_generators.py index bee0119..5b7cd48 100644 --- a/gen/edf_generators.py +++ b/gen/edf_generators.py | |||
| @@ -3,12 +3,12 @@ import random | |||
| 3 | import ecrts14.partition as partition | 3 | import ecrts14.partition as partition |
| 4 | import schedcat.sched.split_heuristic as split | 4 | import schedcat.sched.split_heuristic as split |
| 5 | import ecrts14.ecrts14 as ecrts14 | 5 | import ecrts14.ecrts14 as ecrts14 |
| 6 | import ecrts14.tests as tests | ||
| 6 | 7 | ||
| 7 | from ecrts14.ecrts14 import create_pgm_task_set | 8 | from ecrts14.ecrts14 import create_pgm_task_set |
| 8 | from ecrts14.ecrts14 import get_overheads | 9 | from ecrts14.ecrts14 import get_overheads |
| 9 | from config.config import FILES,PARAMS | 10 | from config.config import FILES,PARAMS |
| 10 | from schedcat.overheads.model import Overheads, CacheDelay, ConsumerOverheads, ProducerOverheads | 11 | from schedcat.overheads.model import Overheads, CacheDelay, ConsumerOverheads, ProducerOverheads |
| 11 | from ecrts14.tests import get_partitions | ||
| 12 | from schedcat.generator.tasksets import NAMED_UTILIZATIONS | 12 | from schedcat.generator.tasksets import NAMED_UTILIZATIONS |
| 13 | from schedcat.mapping.binpack import DidNotFit | 13 | from schedcat.mapping.binpack import DidNotFit |
| 14 | 14 | ||
| @@ -20,13 +20,13 @@ TP_PART_TASK = TP_TBASE.format("-p $t.cpu") | |||
| 20 | TP_CLST_TASK = TP_TBASE.format("-p $t.cluster -z $t.cluster_sz") | 20 | TP_CLST_TASK = TP_TBASE.format("-p $t.cluster -z $t.cluster_sz") |
| 21 | 21 | ||
| 22 | PARTITION_METHOD = { | 22 | PARTITION_METHOD = { |
| 23 | 'no_cache' : partition.partition_no_cache, | 23 | 'no_cache' : tests.test_partition_no_cache, |
| 24 | 'parallel' : partition.partition_parallel, | 24 | 'parallel' : tests.test_partition_parallel, |
| 25 | 'cache_aware' : partition.partition_cache_aware, | 25 | 'cache_aware' : tests.test_partition_cache_aware, |
| 26 | 'cache_aware_parallel' : partition.partition_cache_aware_parallel, | 26 | 'cache_aware_parallel' : tests.test_partition_cache_aware_parallel, |
| 27 | 'cache_aware_edges' : partition.partition_cache_aware_edges, | 27 | 'cache_aware_edges' : tests.test_partition_cache_aware_edges, |
| 28 | 'cache_aware_bfs' : partition.partition_cache_aware_bfs, | 28 | 'cache_aware_bfs' : tests.test_partition_cache_aware_bfs, |
| 29 | 'cache_aware_dfs' : partition.partition_cache_aware_dfs, | 29 | 'cache_aware_dfs' : tests.test_partition_cache_aware_dfs, |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | class EdfGenerator(gen.Generator): | 32 | class EdfGenerator(gen.Generator): |
| @@ -264,15 +264,7 @@ class CflSplitPgmGenerator(EdfPgmGenerator): | |||
| 264 | for t in ts: | 264 | for t in ts: |
| 265 | overheads.consumer.place_production(t) | 265 | overheads.consumer.place_production(t) |
| 266 | 266 | ||
| 267 | try: | 267 | # the test will compute job splits if it is in the desgin point. |
| 268 | ts = PARTITION_METHOD[exp_params['partitions']](ts, graphs, subts, cluster_sz, dp.nr_clusters, dp.system, dp.heur_aggressiveness, overheads) | 268 | is_sched, ts = PARTITION_METHOD[exp_params['partitions']](ts, graphs, subts, dp, overheads) |
| 269 | except DidNotFit: | ||
| 270 | return False, ts | ||
| 271 | 269 | ||
| 272 | # compute split factor | 270 | return is_sched, ts |
| 273 | working_ts = ts | ||
| 274 | partitions = get_partitions(working_ts, dp.nr_clusters, cluster_sz) | ||
| 275 | do_splits = dp.job_splitting | ||
| 276 | is_srt_sched = split.compute_splits_nolock(overheads, False, working_ts, partitions, bypass_split = not do_splits) | ||
| 277 | |||
| 278 | return True, working_ts | ||
