aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2014-01-29 15:54:41 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2014-01-29 15:54:41 -0500
commitf21e72b2d22679154500e64bde37b83b3e587488 (patch)
tree51bc98a0e68c8df51d6f21cea75865b20a3c7dd4
parent38524b6334a2396a4011473ab4c803c687677611 (diff)
Generate only schedulable task sets.
-rw-r--r--gen/edf_generators.py30
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
3import ecrts14.partition as partition 3import ecrts14.partition as partition
4import schedcat.sched.split_heuristic as split 4import schedcat.sched.split_heuristic as split
5import ecrts14.ecrts14 as ecrts14 5import ecrts14.ecrts14 as ecrts14
6import ecrts14.tests as tests
6 7
7from ecrts14.ecrts14 import create_pgm_task_set 8from ecrts14.ecrts14 import create_pgm_task_set
8from ecrts14.ecrts14 import get_overheads 9from ecrts14.ecrts14 import get_overheads
9from config.config import FILES,PARAMS 10from config.config import FILES,PARAMS
10from schedcat.overheads.model import Overheads, CacheDelay, ConsumerOverheads, ProducerOverheads 11from schedcat.overheads.model import Overheads, CacheDelay, ConsumerOverheads, ProducerOverheads
11from ecrts14.tests import get_partitions
12from schedcat.generator.tasksets import NAMED_UTILIZATIONS 12from schedcat.generator.tasksets import NAMED_UTILIZATIONS
13from schedcat.mapping.binpack import DidNotFit 13from schedcat.mapping.binpack import DidNotFit
14 14
@@ -20,13 +20,13 @@ TP_PART_TASK = TP_TBASE.format("-p $t.cpu")
20TP_CLST_TASK = TP_TBASE.format("-p $t.cluster -z $t.cluster_sz") 20TP_CLST_TASK = TP_TBASE.format("-p $t.cluster -z $t.cluster_sz")
21 21
22PARTITION_METHOD = { 22PARTITION_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
32class EdfGenerator(gen.Generator): 32class 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