Skip to content

Commit

Permalink
Merge pull request Theano#4205 from abergeron/fix_buildbot2
Browse files Browse the repository at this point in the history
Fix test that fails on the buildbot
  • Loading branch information
abergeron committed Mar 10, 2016
2 parents 61e7d5a + 046b46d commit f902e1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions theano/sandbox/cuda/tests/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,8 @@ def test_blocksparse_gpu_gemv_opt():

f = theano.function([W, h, iIdx, b, oIdx], o, mode=mode_with_gpu)

assert isinstance(f.maker.fgraph.toposort()[-2].op, GpuSparseBlockGemv)
assert sum(1 for n in f.maker.fgraph.apply_nodes
if isinstance(n.op, GpuSparseBlockGemv)) == 1


def test_blocksparse_gpu_outer_opt():
Expand All @@ -839,7 +840,8 @@ def test_blocksparse_gpu_outer_opt():
wrt=W)],
mode=mode_with_gpu)

assert isinstance(f.maker.fgraph.toposort()[-2].op, GpuSparseBlockOuter)
assert sum(1 for n in f.maker.fgraph.apply_nodes
if isinstance(n.op, GpuSparseBlockOuter)) == 1


class test_diag(theano.tensor.tests.test_nlinalg.test_diag):
Expand Down
2 changes: 1 addition & 1 deletion theano/tensor/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ def perform(self, node, inp, outs):
if axes is None:
axes = tuple(range(x.ndim))
else:
axes = tuple(axes)
axes = tuple(int(ax) for ax in axes)
max[0] = theano._asarray(numpy.max(x, axes),
dtype=node.outputs[0].dtype)
# Numpy does not support multiple axes for argmax
Expand Down
2 changes: 2 additions & 0 deletions theano/tensor/nnet/tests/test_abstract_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def test_basic(self):

class BaseTestConv2d(unittest.TestCase):
def setUp(self):
if theano.config.blas.ldflags == '':
raise SkipTest("BLAS required for reference")
self.inputs_shapes = [(8, 1, 12, 12), (8, 1, 18, 18), (2, 1, 4, 4),
(6, 1, 10, 11), (2, 1, 6, 5), (1, 5, 9, 9)]
self.filters_shapes = [(5, 1, 2, 2), (4, 1, 3, 3), (2, 1, 3, 3),
Expand Down

0 comments on commit f902e1b

Please sign in to comment.