Karim
Karim

Reputation: 1546

Theano fails to be imported with theano configuration cnmem = 1

Theano fails to be imported with theano configuration cnmem = 1

Any idea how to make sure the GPU is totally allocated to the theano python script?

Note: Display is not used to avoid its GPU usage

File: .theanorc

cnmem = 1

File: test.py

print 'Importing Theano Library ...'
import theano
print 'Imported'

Output:

$ python test.py 
Importing Theano Library ... 
Killed 
$

It only works with cnmem = 0.75

File: .theanorc

cnmem = 0.75

Output:

$ python test.py
Importing Theano Library ...
Imported
$ 

Upvotes: 2

Views: 64

Answers (1)

Franck Dernoncourt
Franck Dernoncourt

Reputation: 83427

https://github.com/Theano/Theano/issues/4302#issuecomment-202067917

Could you try with 1.0 instead of 1? according to the docs, it needs to be a float. Also, it is limited to 0.95 to allow space for device drivers. So, you can't use the entire GPU memory just like you can't use all of RAM.

Upvotes: 1

Related Questions