提交 4a74878a authored 作者: Frederic Bastien's avatar Frederic Bastien

enable the test for elemwise fusion by manualy enabling the fusion optimizer.

上级 f6c71345
...@@ -15,7 +15,8 @@ import numpy ...@@ -15,7 +15,8 @@ import numpy
from theano import function, compile from theano import function, compile
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
import unittest, copy
from copy import copy as cp
def inputs(xbc = (0, 0), ybc = (0, 0), zbc = (0, 0)): def inputs(xbc = (0, 0), ybc = (0, 0), zbc = (0, 0)):
x = TensorType(broadcastable = xbc, dtype = 'float64')('x') x = TensorType(broadcastable = xbc, dtype = 'float64')('x')
...@@ -973,13 +974,10 @@ class test_fusion(unittest.TestCase): ...@@ -973,13 +974,10 @@ class test_fusion(unittest.TestCase):
return times return times
def test_elemwise_fusion(self): def test_elemwise_fusion(self):
raise SkipTest("Current implementation of test_fusion is not enabled. So we skip the corresponding test")
shp=(5,5) shp=(5,5)
#we need the optimisation enabled, debug do this. #we need the optimisation enabled, debug do this.
mode=compile.mode.predefined_modes['FAST_COMPILE'] mode=cp(compile.mode.get_default_mode())
mode=compile.mode.predefined_modes['FAST_RUN'] mode._optimizer=mode._optimizer.including('local_elemwise_fusion')
mode=compile.mode.predefined_modes['DEBUG_MODE']
self.do(mode, shared, shp) self.do(mode, shared, shp)
def gpu_fusion(self): def gpu_fusion(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论