提交 80e91c18 authored 作者: Frederic Bastien's avatar Frederic Bastien

check that that we don't load an old version of cuda_ndarray. If so, print a warning.

上级 4880887e
...@@ -80,6 +80,11 @@ if compile_cuda_ndarray: ...@@ -80,6 +80,11 @@ if compile_cuda_ndarray:
from cuda_ndarray.cuda_ndarray import * from cuda_ndarray.cuda_ndarray import *
if enable_cuda: if enable_cuda:
#check if their is an old cuda_ndarray that was loading instead of the one we compiled!
import cuda_ndarray.cuda_ndarray
if os.path.join(config.compiledir,'cuda_ndarray','cuda_ndarray.so')!=cuda_ndarray.cuda_ndarray.__file__:
print "WARNING: cuda_ndarray was loaded from",cuda_ndarray.cuda_ndarray.__file__,"This is not expected as theano should compile it automatically for you. Do you have a directory called cuda_ndarray in your LD_LIBRARY_PATH environment variable? If so, please remove it as it is outdated!"
from theano.sandbox.cuda.type import CudaNdarrayType from theano.sandbox.cuda.type import CudaNdarrayType
from theano.sandbox.cuda.var import (CudaNdarrayVariable, from theano.sandbox.cuda.var import (CudaNdarrayVariable,
CudaNdarrayConstant, CudaNdarrayConstant,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论