我有一個AWS機4個GPU:theanorc對多GPU
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筆記本和進口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筆記本上相同的ma同時也是中國人。然後,我得到的錯誤:
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?'沒有運氣。 –
檢查我的答案。 –