def test_gpu_fusion(self):
shp = (5, 5)
# we need the optimisation enabled, debug do this.
if theano.config.mode == "FAST_COMPILE":
mode = theano.compile.mode.get_mode("FAST_RUN").including(
'local_elemwise_fusion', 'composite_elemwise_fusion',
'canonicalize', 'gpu')
else:
mode = theano.compile.mode.get_default_mode().including(
'local_elemwise_fusion', 'composite_elemwise_fusion',
'canonicalize', 'gpu')
import theano.sandbox.cuda as cuda
if not cuda.cuda_available:
raise SkipTest("cuda not available")
self.do(mode, cuda.float32_shared_constructor, shp, gpu=True)
评论列表
文章目录