提交 677710cb authored 作者: Frederic's avatar Frederic

Fix import order that cause crash.

上级 fb5e21ce
...@@ -889,6 +889,7 @@ class VM_Linker(link.LocalLinker): ...@@ -889,6 +889,7 @@ class VM_Linker(link.LocalLinker):
if not hasattr(thunks[-1], 'lazy'): if not hasattr(thunks[-1], 'lazy'):
# We don't want all ops maker to think about lazy Ops. # We don't want all ops maker to think about lazy Ops.
# So if they didn't specify that its lazy or not, it isn't. # So if they didn't specify that its lazy or not, it isn't.
# If this member isn't present, it will crash later.
thunks[-1].lazy = False thunks[-1].lazy = False
except Exception, e: except Exception, e:
e.args = ("The following error happened while" e.args = ("The following error happened while"
......
...@@ -976,11 +976,11 @@ class T_using_gpu(unittest.TestCase): ...@@ -976,11 +976,11 @@ class T_using_gpu(unittest.TestCase):
def test_using_gpu_pycudaop(self): def test_using_gpu_pycudaop(self):
import theano.misc.pycuda_init import theano.misc.pycuda_init
from pycuda.compiler import SourceModule
import theano.sandbox.cuda as cuda
if not theano.misc.pycuda_init.pycuda_available: if not theano.misc.pycuda_init.pycuda_available:
raise SkipTest("Pycuda not installed. Skip test of theano op" raise SkipTest("Pycuda not installed. Skip test of theano op"
" with pycuda code.") " with pycuda code.")
from pycuda.compiler import SourceModule
import theano.sandbox.cuda as cuda
import theano.sandbox.cuda as cuda_ndarray import theano.sandbox.cuda as cuda_ndarray
if not cuda_ndarray.cuda_available: if not cuda_ndarray.cuda_available:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论