Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bh107/benchpress
Browse files Browse the repository at this point in the history
  • Loading branch information
safl committed Mar 7, 2016
2 parents 5d1c09c + bd0fa44 commit 5548f16
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,26 @@
from numpy.lib.stride_tricks import as_strided
import numpy_force as numpy

def mshare(T,S,R):
A = np.ones_like(T)
C = A + 43
E = C + T + np.gather(S,R) + A
D = C[::-1] + np.gather(S,R) + T
return (C,E,D)

def main():
B = util.Benchmark()
N = B.size[0]
I = B.size[1]
U = util.Benchmark()
N = U.size[0]
I = U.size[1]

T = np.ones(N)
S = np.ones(N)
R = np.array(numpy.random.random_integers(0,N,N), dtype=np.uint64)
B.start()
U.start()
for _ in xrange(I):
t = mshare(T,S,R)
B.flush()
B.stop()
B.pprint()
A = np.ones_like(T)
B = np.empty(len(T)+1,dtype=T.dtype)
B[1:] = A
C = B[1:] + T + np.gather(S,R) + A
D = B[:-1] + np.gather(S,R)
E = D + T + C
del A
U.flush()
U.stop()
U.pprint()

if __name__ == "__main__":
main()
10 changes: 5 additions & 5 deletions suites/fuse_paper_cost_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ def fuse_cache(value):
return ret

scripts_cpu = [
('Game of Life', 'gameoflife', '--size=10000*10000*10*2'),
('Game of Life', 'gameoflife', '--size=10000*10000*40*2'),
]

scripts_cpu_jacobi = [
('Jacobi Solver', 'jacobi', '--size=14000*10'),
('Jacobi Solver', 'jacobi', '--size=14000*40'),
]

scripts_cpu_alain = [
('Alain Example', 'alain', '--size=100000000*10'),
('Alain Example', 'alain', '--size=100000000*40'),
]

scripts_cpu_alain_fixed = [
('Alain Example Fixed', 'alain', '--size=100000000*10'),
('Alain Example Fixed', 'alain', '--size=100000000*40'),
]

scripts_cpu_calain = [
('Alain Counterexample', 'alain_counterexample', '--size=50000000*10'),
('Alain Counterexample', 'alain_counterexample', '--size=50000000*40'),
]

def Jacobi_fixed_fusion(Iterations):
Expand Down

0 comments on commit 5548f16

Please sign in to comment.