提交 3a6903c7 authored 作者: Frederic Bastien's avatar Frederic Bastien

enable test for fusion on the gpu.

上级 8b6c3291
......@@ -840,13 +840,13 @@ class test_fusion(unittest.TestCase):
mode._optimizer=mode._optimizer.including('local_elemwise_fusion','canonicalize')
self.do(mode, shared, shp)
def gpu_fusion(self):
def test_gpu_fusion(self):
shp=(5,5)
#we need the optimisation enabled, debug do this.
mode=compile.mode.predefined_modes['FAST_COMPILE']
mode=compile.mode.predefined_modes['FAST_RUN']
mode=compile.mode.predefined_modes['DEBUG_MODE']
mode = theano.compile.mode.get_mode(mode).including('gpu')
if theano.config.mode == "FAST_COMPILE":
mode = theano.compile.mode.get_mode("FAST_RUN").including('local_elemwise_fusion','canonicalize','gpu')
else:
mode = theano.compile.mode.get_default_mode().including('local_elemwise_fusion','canonicalize','gpu')
import theano.sandbox.cuda as cuda
self.do(mode, cuda.float32_shared_constructor, shp, gpu=True)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论