def test_gpu_fusion_Xd(self):
# 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")
sizes = cuda.opt.get_device_type_sizes()
if sizes['int_size'] == 4:
shp = (5, 5, 5, 5)
else:
shp = (5, 5, 5)
self.do(mode, cuda.float32_shared_constructor, shp, gpu=True)
评论列表
文章目录