getting “pygpu was configured but could not be imported” error while trying with OpenCL+Theano on AMD Radeon

时光毁灭记忆、已成空白 提交于 2019-12-01 03:32:32
tobnic

I fixed this issue with the step-by-step installation given in the lipgpuarray website!

Download

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

Install libgpuarray

# extract or clone the source to <dir>
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 ..

Install pygpu

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

Source: http://deeplearning.net/software/libgpuarray/installation.html

This worked for me! Good Luck

Mih Zam

Installing the blas library seems enough. I'm doing tests for the same problem.

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

And after that

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

Building and Installing with regard to python3

python3 setup.py build
sudo -H python3 setup.py install

I hope it can help you. Now just the dev version of theano is missing for me.

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