Skip to content

Commit

Permalink
A couple of fixes due to switching benchmarks to benchpress.
Browse files Browse the repository at this point in the history
  • Loading branch information
safl committed Apr 20, 2015
1 parent 0611a2a commit 0ca054a
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions test/python/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self):
# Benchmark parameters
self.script = "gameoflife"
self.dtypes = [bh.float64]
self.sizetxt = "10*10*50"
self.sizetxt = "10*10*50*1"
self.inputfn = "gameoflife_input-{0}-12*12.npz"

def test_gameoflife(self, pseudo_arrays):
Expand Down Expand Up @@ -108,23 +108,21 @@ def __init__(self):
def test_heat_equation(self, pseudo_arrays):
return self.run(pseudo_arrays)

""" Segfaults so we cannot test it.
class test_jacobi(BenchHelper, numpytest):

def __init__(self):
numpytest.__init__(self)
self.config['maxerror'] = 0.0001
self.size = 2
self.config['maxerror'] = 0.001
self.size = 20

# Benchmark parameters
self.script = "jacobi"
self.dtypes = [bh.float32, bh.float64]
self.sizetxt = "2"
self.sizetxt = "1000*10"
self.inputfn = None

def test_jacobi(self, pseudo_arrays):
return self.run(pseudo_arrays)
"""

class test_jacobi_fixed(BenchHelper, numpytest):

Expand All @@ -142,36 +140,37 @@ def __init__(self):
def test_jacobi_fixed(self, pseudo_arrays):
return self.run(pseudo_arrays)

class test_jacobi_solve(BenchHelper, numpytest):

class test_heat_equation(BenchHelper, numpytest):

def __init__(self):
numpytest.__init__(self)
self.config['maxerror'] = 0.001
self.size = 20

# Benchmark parameters
self.script = "jacobi_solve"
self.script = "heat_equation"
self.dtypes = [bh.float32, bh.float64]
self.sizetxt = "1000*1000*10"
self.inputfn = None

def test_jacobi_solve(self, pseudo_arrays):
def test_heat_equation(self, pseudo_arrays):
return self.run(pseudo_arrays)

class test_jacobi_stencil(BenchHelper, numpytest):
class test_heat_equation_fixed(BenchHelper, numpytest):

def __init__(self):
numpytest.__init__(self)
self.config['maxerror'] = 0.001
self.size = 20

# Benchmark parameters
self.script = "jacobi_stencil"
self.script = "heat_equation_fixed"
self.dtypes = [bh.float32, bh.float64]
self.sizetxt = "1000*1000*10"
self.inputfn = None

def test_jacobi_stencil(self, pseudo_arrays):
def test_heat_equation_fixed(self, pseudo_arrays):
return self.run(pseudo_arrays)

"""
Expand All @@ -180,20 +179,20 @@ def test_jacobi_stencil(self, pseudo_arrays):
It needs to have main() implemented.
"""

class test_knn_naive1(BenchHelper, numpytest):
class test_knn_naive(BenchHelper, numpytest):

def __init__(self):
numpytest.__init__(self)
self.config['maxerror'] = 0.01
self.size=10000

# Benchmark parameters
self.script = "knn_naive1"
self.script = "knn_naive"
self.dtypes = [bh.float32, bh.float64]
self.sizetxt = "10000*100*3"
self.inputfn = None

def test_knn_naive1(self, pseudo_arrays):
def test_knn_naive(self, pseudo_arrays):
return self.run(pseudo_arrays)

"""
Expand Down

0 comments on commit 0ca054a

Please sign in to comment.