提交 5c826bdc authored 作者: fsavard's avatar fsavard

Bug in GpuJoin. Removing optimization until solved

上级 170abace
......@@ -499,7 +499,7 @@ def local_gpu_join(node):
not implemented yet.
"""
if isinstance(node.op, tensor.Join):
if False and isinstance(node.op, tensor.Join):
# optimizing this case:
# join(host_from_gpu) -> host_from_gpu(gpu_join)
......
......@@ -74,7 +74,8 @@ def test_softmax_with_bias():
def test_opt_gpujoin_onlyajoin():
def test_opt_gpujoin_joinvectors_elemwise_than_minusone():
# from a bug in normal sampling
_a = numpy.asarray([[1,2],[3,4]],dtype='float32')
_b = numpy.asarray([[5,6,7],[8,9,10]],dtype='float32')
a = theano.shared(_a)
......@@ -94,6 +95,7 @@ def test_opt_gpujoin_onlyajoin():
assert numpy.all(f() == numpy.concatenate([_a,_b], axis=1))
if __name__ == '__main__':
test_opt_gpujoin_onlyajoin()
test_opt_gpujoin_joinvectors_elemwise_than_minusone()
......@@ -808,7 +808,7 @@ def test_normal0():
print prefix, 'samples/sec', steps*sample_size[0]*sample_size[1] / dt
sample_size = (999,100)
'''
print ''
print 'ON CPU:'
......@@ -820,9 +820,12 @@ def test_normal0():
basictest(f, 50, -5.0, 2.0, prefix='mrg ')
sys.stdout.flush()
'''
# now with odd number of samples
sample_size = (999,99)
sample_size = (10,10)
#sample_size = (999,99)
print ''
print 'ON GPU:'
......@@ -832,12 +835,16 @@ def test_normal0():
f = theano.function([], theano.Out(
theano.sandbox.cuda.basic_ops.gpu_from_host(n),
borrow=True))
theano.printing.debugprint(f)
sys.stdout.flush()
print 'random?[:10]\n', numpy.asarray(f())[0,0:10]
print '----'
sys.stdout.flush()
basictest(f, 50, -5.0, 2.0, prefix='gpu mrg ')
sys.stdout.flush()
'''
print ''
print 'ON CPU w NUMPY:'
RR = theano.tensor.shared_randomstreams.RandomStreams(234)
......@@ -846,10 +853,11 @@ def test_normal0():
ff = theano.function([], nn)
basictest(ff, 50, -5.0, 2.0, prefix='numpy ')
'''
#if __name__ == '__main__':
# # with: export THEANO_FLAGS=device=gpu0,floatX=float32
# test_normal0()
if __name__ == '__main__':
# with: export THEANO_FLAGS=device=gpu0,floatX=float32
test_normal0()
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论