【发布时间】:2016-11-25 05:15:26
【问题描述】:
我有一台配备 4 个 GPU 的 aws 机器:
00:03.0 VGA compatible controller: NVIDIA Corporation GK104GL [GRID K520] (rev a1)
00:04.0 VGA compatible controller: NVIDIA Corporation GK104GL [GRID K520] (rev a1)
00:05.0 VGA compatible controller: NVIDIA Corporation GK104GL [GRID K520] (rev a1)
00:06.0 VGA compatible controller: NVIDIA Corporation GK104GL [GRID K520] (rev a1)
我的 theanorc 文件如下所示:
[global]
floatX = float32
device = gpu0
[lib]
cnmem = 1
当我打开一个 jupyter notebook 并导入 theano 时,我得到以下信息(我假设它只使用一个 GPU):
Using Theano backend.
Using gpu device 0: GRID K520 (CNMeM is enabled with initial size: 95.0% of memory, cuDNN 5105)
/home/sabeywardana/anaconda3/lib/python3.5/site-packages/theano/sandbox/cuda/__init__.py:600: UserWarning: Your cuDNN version is more recent than the one Theano officially supports. If you see any problems, try updating Theano or downgrading cuDNN to version 5.
但是,如果我同时在同一台机器上打开第二个 jupyter 笔记本。然后我得到错误:
ERROR (theano.sandbox.cuda): ERROR: Not using GPU. Initialisation of device 0 failed:
initCnmem: cnmemInit call failed! Reason=CNMEM_STATUS_OUT_OF_MEMORY. numdev=1
ERROR (theano.sandbox.cuda): ERROR: Not using GPU. Initialisation of device gpu failed:
initCnmem: cnmemInit call failed! Reason=CNMEM_STATUS_OUT_OF_MEMORY. numdev=1
如果我手动更改我的 .theanorc 以使用 gpu1,那么第二个 jupyter 笔记本工作正常。 所以问题是:有没有办法配置 .theanorc 以获得可用的 GPU?
【问题讨论】:
-
我不确定。虽然努力。尝试仅用 gpu 替换 gpu0。让我知道它是否有效。
-
试过了,
gpu?没有运气。
标签: theano theano-cuda