2

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
$ 
Karim
  • 1,526
  • 4
  • 13
  • 16

1 Answers1

1

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.

Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501