Why does the floatX's flag impact whether GPU is used in Theano?

会有一股神秘感。 提交于 2019-12-06 10:04:39
Neil G

As far as I know, it's because they haven't yet implemented float64 for GPUs.

http://deeplearning.net/software/theano/tutorial/using_gpu.html :

Only computations with float32 data-type can be accelerated. Better support for float64 is expected in upcoming hardware but float64 computations are still relatively slow (Jan 2010).

From http://deeplearning.net/software/theano/tutorial/using_gpu.html#gpuarray-backend I read that it is possible to perform float64 calculations on GPU, but you have to install the libgpuarray from source.

I managed to install it, see this script, I used virtualenv, you don't even have to have sudo.

After installation you can use the old backend with config flag device=gpu and the new backend with device=cuda.

The new backend can perform 64 bit calculations, but it works differently for me. Some operations stopped working. ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law :)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!