Skip to content

Commit

Permalink
fixed the manual fusion in the cost model suite
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Feb 22, 2016
1 parent 8258e24 commit 83d6b14
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions suites/fuse_paper_cost_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,17 @@ def fuse_cache(value):
('Alain Counterexample', 'alain_counterexample', '--size=50000000*10'),
]

MaxShare_fixed_fusion = "2:1+2,2:6+7,2:8+9,2:10+11,2:12+13,2:5+6,2:5+8,2:5+10"
TmpElem_fixed_fusion = "2:1+2,2:6+7,2:8+9,2:10+11,2:12+13"
def MaxShare_fixed_fusion(Iterations):
ret = ""
for i in xrange(Iterations):
ret += "2:1+2,%(i)d:6+7,%(i)d:8+9,%(i)d:10+11,%(i)d:12+13,%(i)d:5+6,%(i)d:5+8,%(i)d:5+10,"%{'i':i+2}
return ret[:-1]

def TmpElem_fixed_fusion(Iterations):
ret = ""
for i in xrange(Iterations):
ret += "%(i)d:1+2,%(i)d:1+3,%(i)d:1+4,%(i)d:1+5,%(i)d:6+7,%(i)d:8+9,%(i)d:10+11,%(i)d:12+13,"%{'i':i+2}
return ret[:-1]

stack_cpu = [
[('default', 'bridge', None)],
Expand All @@ -47,11 +56,11 @@ def fuse_cache(value):
[
('UniqueViews', 'bcexp', {'BH_PRICE_MODEL':'unique_views'}),
('TmpElem', 'bcexp', {'BH_PRICE_MODEL':'temp_elemination',
'BH_FUSER_OPTIMAL_MERGE':TmpElem_fixed_fusion}),
'BH_FUSER_OPTIMAL_MERGE':TmpElem_fixed_fusion(10)}),
('MaxShare', 'bcexp', {'BH_PRICE_MODEL':'max_share',
'BH_FUSER_OPTIMAL_MERGE':MaxShare_fixed_fusion}),
'BH_FUSER_OPTIMAL_MERGE':MaxShare_fixed_fusion(10)}),
('AmosRobinson','bcexp', {'BH_PRICE_MODEL':'amos',
'BH_FUSER_OPTIMAL_MERGE':MaxShare_fixed_fusion}),
'BH_FUSER_OPTIMAL_MERGE':MaxShare_fixed_fusion(10)}),
]
stack_cpu_alain_fixed[3][0] = ('Optimal','optimal', {'BH_OPTIMAL_CACHE_PATH':"/tmp/bh_fixed_fuse_cache"})

Expand Down

0 comments on commit 83d6b14

Please sign in to comment.