theano GPU支持:未找到PTX JIT编译器库

时间:2017-11-13 07:15:32

标签: theano theano-cuda

我正在安装libgpuarray v0.7.4。当我导入theano时,我收到以下错误: 我正在使用的版本:

(1)来自github的Theano(rel-1.0.0rc1),

(2)CUDA 9.0 (我确信CUDA / cusolver有效,我安装了pycuda,scikit-cuda并且可以成功运行它们)

(3)cuDNN 7.0.3

(4)nvidia driver 384.90

Python 3.5.2 (default, Sep 14 2017, 22:51:06) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import theano
Using cuDNN version 7003 on context None
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/Theano-1.0.0rc1-py3.5.egg/theano/gpuarray/__init__.py", line 220, in <module>
    use(config.device)
  File "/usr/local/lib/python3.5/dist-packages/Theano-1.0.0rc1-py3.5.egg/theano/gpuarray/__init__.py", line 207, in use
    init_dev(device, preallocate=preallocate)
  File "/usr/local/lib/python3.5/dist-packages/Theano-1.0.0rc1-py3.5.egg/theano/gpuarray/__init__.py", line 152, in init_dev
    pygpu.blas.gemm(0, tmp, tmp, 0, tmp, overwrite_c=True)
  File "pygpu/blas.pyx", line 149, in pygpu.blas.gemm
  File "pygpu/blas.pyx", line 47, in pygpu.blas.pygpu_blas_rgemm
pygpu.gpuarray.GpuArrayException: (b'cuLinkCreate: CUDA_ERROR_JIT_COMPILER_NOT_FOUND: PTX JIT compiler library not found', 3)

有关如何解决它的任何想法? 我想利用theano的GPU支持

编辑(回复talonmies)

我认为pygpu可以在我的GPU上创建一个上下文:

$ DEVICE=cuda python3
Python 3.5.2 (default, Sep 14 2017, 22:51:06) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygpu
>>> pygpu.test()
pygpu is installed in /usr/local/lib/python3.5/dist-packages/pygpu-0.7.4-py3.5-linux-x86_64.egg/pygpu
NumPy version 1.13.3
NumPy relaxed strides checking option: True
NumPy is installed in /usr/local/lib/python3.5/dist-packages/numpy-1.13.3-py3.5-linux-x86_64.egg/numpy
Python version 3.5.2 (default, Sep 14 2017, 22:51:06) [GCC 5.4.0 20160609]
nose version 1.3.7
*** Testing for GeForce GTX TITAN Black
mpi4py found: False
.EEEEEEEEEEEEEEEEEEEEEEEEEEE

另一方面,运行nvidia-smi

Mon Nov 13 15:39:35 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90                 Driver Version: 384.90                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX TIT...  Off  | 00000000:01:00.0 Off |                  N/A |
| 28%   47C    P2    94W / 250W |    102MiB /  6082MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      5562      C   python3                                       91MiB |
+-----------------------------------------------------------------------------+

我跟踪了代码,发现错误出现在BLAS GEMM中。我认为我的GPU没有编译代码,libgpuarray需要在我的机器上编译。但不知怎的,它无法找到编译器。

END OF EDIT

1 个答案:

答案 0 :(得分:2)

我遇到了类似的问题,但我需要创建符号链接

libnvidia-ptxjitcompiler.so.384.81

指向

libnvidia-ptxjitcompiler.so.1 libnvidia-ptxjitcompiler.so