我是运行 Scientific Linux 6.6 版(Carbon)的集群计算机上的非 root 用户。
在使用 CUDA 7.5 和 cuDNN 5 在 GPU 上运行代码时,我遇到了一些 theano 崩溃。我使用的是 Python 2.7、Theano 0.9、Keras 1.0.7 和 Lasange 0.1。
仅当我在启用了 cuDNN 的 GPU 节点上运行程序时,才会发生以下崩溃。该代码在禁用 cuDNN 的 CPU 和 GPU 上顺利完成。
Traceback (most recent call last):
File "runner.py", line 306, in <module>
main()
File "runner.py", line 241, in main
queries_exp = __import__(args.exp_model).queries_exp
File "/mnt/nfs2/inf/tjb32/workspace/CNN_EL/nlp-entity-convnet/exp_multi_conv_cosim.py", line 923, in <module>
queries_exp = EntityVectorLinkExp()
File "/mnt/nfs2/inf/tjb32/workspace/CNN_EL/nlp-entity-convnet/exp_multi_conv_cosim.py", line 51, in __init__
self._setup()
File "/mnt/nfs2/inf/tjb32/workspace/CNN_EL/nlp-entity-convnet/exp_multi_conv_cosim.py", line 543, in _setup
on_unused_input='ignore',
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/compile/function.py", line 326, in function
output_keys=output_keys)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 484, in pfunc
output_keys=output_keys)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/compile/function_module.py", line 1788, in orig_function
output_keys=output_keys).create(
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/compile/function_module.py", line 1467, in __init__
optimizer_profile = optimizer(fgraph)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 102, in __call__
return self.optimize(fgraph)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 90, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 235, in apply
sub_prof = optimizer.optimize(fgraph)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 90, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 235, in apply
sub_prof = optimizer.optimize(fgraph)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 90, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 2262, in apply
lopt_change = self.process_node(fgraph, node, lopt)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 1825, in process_node
lopt, node)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 1719, in warn_inplace
return NavigatorOptimizer.warn(exc, nav, repl_pairs, local_opt, node)
File "/home/t/tj/tjb32/.local/lib/python2.7/site-packages/theano/gof/opt.py", line 1705, in warn
raise exc
AssertionError
我的 .theanorc 看起来像这样:
[global]
floatX = float32
device = gpu
[lib]
cnmem = 1
[nvcc]
fastmath = True
我的个人资料有以下内容:
export LD_LIBRARY_PATH=/home/t/tj/tjb32/cuda/lib64:$LD_LIBRARY_PATH
export CPATH=/home/t/tj/tjb32/cuda/include:$CPATH
export LIBRARY_PATH=/home/t/tj/tjb32/cuda/lib64:$LD_LIBRARY_PATH
export PATH=/home/t/tj/tjb32/cuda/bin:$PATH
当我查询 theano 时,返回以下内容,这表明 theano 正在与 CUDA 和 cuDNN 交互。
Using gpu device 0: Tesla K20m (CNMeM is enabled with initial size: 95.0% of memory, cuDNN 5005)
我相当确定我已经正确安装了 CUDA 和 cuDNN,如果有人能提出任何我可能错过的导致 cuDNN 使程序崩溃的额外配置步骤,我将不胜感激。