2016-09-02 12 views
9

AMD에 오픈 CL + Theano와 함께하는 동안 나는이의 지시에 따랐다 오류 : 나는 시도 할 때 다음받고 "pygpu 구성되었지만 가져올 수 없습니다"라데온

https://gist.github.com/jarutis/ff28bca8cfb9ce0c8b1a

하지만을 : THEANO_FLAGS = 장치 = opencl0 :

ERROR (theano.sandbox.gpuarray) : 나는 오류가 무엇입니까 테스트 파일에 0 파이썬 test.py
pygpu가 구성되었지만 (마지막으로 가장 최근 통화) 역 추적을 가져올 수 없습니다 : 파일 "/ home/mesayant "

import pygpu 

파일에서, 라인 (20),"AN/.local의/lib 디렉토리/python2.7/사이트 패키지/theano/샌드 박스/gpuarray/초기화 평은/usr/src에/gtest/clBLAS/건설/libgpuarray/pygpu/초기화 /usr/src/gtest/clBLAS/build/libgpuarray/pygpu/elemwise.py ""

from . import gpuarray, elemwise, reduction 

파일에서, 7 호선, " 평, 3 행에

from .dtypes import dtype_to_ctype, get_common_dtype 

fil

from . import gpuarray 

ImportError를에서 전자 "/usr/src/gtest/clBLAS/build/libgpuarray/pygpu/dtypes.py", 라인 6, : 나는 좋은 생각이없는 이름 gpuarray

를 가져올 수 없습니다. 나는이 모든 것을 처음으로 사용하고있다. 나는 우분투 14.04 LTS에서 일하고있다. 이 오류를 어떻게 해결할 수 있습니까?

답변

7

이 문제는 lipgpuarray 웹 사이트의 단계별 설치 양식으로 해결되었습니다.

다운로드

git clone https://github.com/Theano/libgpuarray.git 
cd libgpuarray 

설치 설치

cd <dir> 
mkdir Build 
cd Build 
# you can pass -DCMAKE_INSTALL_PREFIX=/path/to/somewhere to install to an alternate location 
cmake .. -DCMAKE_BUILD_TYPE=Release # or Debug if you are investigating a crash 
make 
make install 
cd .. 

libgpuarray pygpu

# This must be done after libgpuarray is installed as per instructions above. 
python setup.py build 
python setup.py install 

출처 : http://deeplearning.net/software/libgpuarray/installation.html

이 법과 나를 위해 ked! 행운을 빌어 요.

+1

cmake에서 접두어를 지정하면'python setup.py build' 행이 약간 다릅니다.링크는이 문맥에서 정확한 라인을 제공합니다. –

4

설치하는 것이 좋습니다. 나는 같은 문제에 대한 테스트를하고있다.

cd ~ 
git clone https://github.com/clMathLibraries/clBLAS.git 
cd clBLAS/ 
mkdir build 
cd build/ 
sudo apt-cache search openblas 
sudo apt-get install libopenblas-base libopenblas-dev 
sudo apt-get install liblapack3gf liblapack-doc liblapack-dev 
cmake ../src 
make 
sudo make install 

그리고 나를 위해

git clone https://github.com/Theano/libgpuarray.git 
cd libgpuarray 
mkdir Build 
cd Build 
cmake .. -DCMAKE_BUILD_TYPE=Release 

make 
sudo make install 
cd .. 
sudo apt-get install cython 
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git 

내가 당신을 도울 수 있기를 바랍니다
python3 setup.py build 
sudo -H python3 setup.py install 

을 python3. 이제 devano 버전의 theano가 나를 위해 누락되었습니다.