New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu 16.04 and CUDA #4430
Comments
Could you try downloading and installing CUDA -toolkit from the NVIDIA S. Gokula Krishnan, Fourth-year Undergraduate student On Mon, Apr 25, 2016 at 5:03 PM, Guillermo Jiménez Pérez <
ᐧ |
@gokul-uf Thank you for the quick response! Done installing, right now compiling with no errors the CUDA samples but getting the same error when running the code for testing the GPU. I reinstalled Theano using Edit: the "new" code for the error using the package provided by NVIDIA is:
|
The URL links to testing the GPU when using the gpuarray backend, did you install that? Another user had reported a similar issue some time ago. Theano/libgpuarray#19 |
Did you reboot after installing the cuda drivers? This is needed. Also be On Mon, Apr 25, 2016 at 8:20 AM, Gokula Krishnan notifications@github.com
|
I am sorry for the delay in my response. @gokul-uf I incorrectly linked the code for testing the libgpuarray backend but I was testing the code in the "CUDA Backend". I don't know if I am mistaken in the installation process but I'm not installing libgpuarray as I think it's not mandatory, my OS' version is not recommended and I don't have much experience building from source. Is it a must to install the mentioned library in order to use the GPU? @nouiz Hi! Thanks for the support. I did reboot after installing the CUDA drivers. I also ran |
@gokul-uf Also, I'll try to follow the reinstall procedure as you recommended, I'll keep you posted. Thanks! EDIT: I did |
Update: while I waited for updates I used another recently released Deep Learning benchmark and I managed to run code with GPU support so I'd say it's definitely a Theano issue. Update: It seems it's not. |
There is no problem with Theano. I tried it and we need to work around 2 problems that aren't dependent of Theano.
sudo apt-get install g++-4.9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
nvcc.flags=-D_FORCE_INLINES |
seems this issue is closed, but just wanted to note another possible (though untested) solution: forcing cuda to work with gcc-5, by editing '/usr/local/cuda/include/host_config.h'. |
@davidsvaughn Hi! Thanks for the support. With respect to the information you provide, I followed that same link to install CUDA in my computer, and I edited the file you mention, but the result (in my case) was the same. |
I added in a commit to a PR update to our installation instruction: On Wed, Apr 27, 2016 at 12:25 PM, Guillermo Jiménez Pérez <
|
@nouiz Thanks! It might be convenient to add that the procedure was only tested installing the NVIDIA package, instead of installing CUDA from the Ubuntu Repositories. |
Is there any chance of Theano soon working with the already packaged nvidia-361-driver and CUDA 7.5 in Ubuntu 16.04? PyCUDA seems to work with the ubuntu-supplied packages as seen in https://gist.github.com/PureW/9b10181950a188d7ec24184a497345f5 while theano replies with "No device found". EDIT: Ahh, it seems to work with the solution |
Just for the record I was able to get this to work perfectly on Ubuntu 16.04 (with packaged drivers and CUDA) by updating
Then ran the script at http://deeplearning.net/software/theano/tutorial/using_gpu.html#using-gpu to confirm. |
I can confirm that the above works for me, though to get rid of the deprecation warning one small change, from
|
Hi all,
I have started working with Theano recently and I have encountered a problem when using Theano on a freshly installed Ubuntu Mate 16.04 platform. I have a NVIDIA K2200M video card which is CUDA-capable and is correctly installed, as the nvidia-smi command shows:
I have firstly installed NVIDIA-CUDA-toolkit from the Ubuntu Mate repo, getting the 7.5.18 version and then ran the code to test the GPU provided in www.deeplearning.net with the usual flags
THEANO_FLAGS='device=gpu,floatX=float32
but the following error arose:I have also tried using the flag
device=cuda
, as suggested in the Issue 4384. Firstly I thought it was my OS' fault as installing NVIDIA-CUDA-toolkit from the official Ubuntu Mate repo did not create any folder /usr/local/cuda-X.Y, so I could not follow the instructions given in "Using the GPU". Because of that I installed the NVIDIA-CUDA-toolkit following a guide to install CUDA in Ubuntu 16.04 and I could install everything as sugested in the aforementioned guide to using the GPU, in the right folder. Nevertheless, exactly the same error arose. I have reasons to believe it has something to do with Theano's implementation rather than a bad Ubuntu integration between the GPU and the NVIDIA-CUDA-toolkit as when I installed CUDA from the official NVIDIA webpage, I could run seamlessly any CUDA sample free of hassle but Theano didn't seem to find the GPU.I have also tried to follow any possible piece of advice given here and in the Theano Google Group (running
sudo nvidia-smi
, running an example before trying to compute anything, etc.).I tried (with my limited programming skills) to track the problem and it seems that the problem is found when compiling the cuda_ndarray in the theano.sandbox.cuda module. The strangest thing is that even when installing the CUDA toolking from the repo, which installs nvcc in
/usr/bin
for some unknown reason), the commandnvcc_compiler.is_nvcc_available()
returnsTrue
so the CUDA compiler is found but, whereas nvcc seems to be able to compile CUDA code, it cannot compilecuda_ndarray
.Any advice?
The text was updated successfully, but these errors were encountered: