Coder Social home page Coder Social logo

Comments (13)

lebedov avatar lebedov commented on May 22, 2024

What version of CUDA do you have installed? Also, can you try running the CUBLAS unit tests in tests/test_cublas.py and let me know what happens?

from scikit-cuda.

samhumeau avatar samhumeau commented on May 22, 2024

Hi, thanks for the quick answer,

I have currenty CUDA 5.5 installed (Ubuntu 14.04).
When I run the test_cublas, it shows 10 errors (on 54 tests) that follow the same pattern:

ERROR: test_cublasSgeam (main.test_cublas)
Traceback (most recent call last):
File "test_cublas.py", line 429, in test_cublasSgeam
cublas.cublasSgeam(self.cublas_handle, 'n', 'n', 2, 3,
AttributeError: 'module' object has no attribute 'cublasSgeam'

and the same thing for:
ERROR: test_cublasSgeam (main.test_cublas)
ERROR: test_cublasCgeam (main.test_cublas)
ERROR: test_cublasSgemmBatched (main.test_cublas)
ERROR: test_cublasStrsmBatched (main.test_cublas)
ERROR: test_cublasSgetrfBatched (main.test_cublas)
ERROR: test_cublasDgeam (main.test_cublas)
ERROR: test_cublasZgeam (main.test_cublas)
ERROR: test_cublasDgemmBatched (main.test_cublas)
ERROR: test_cublasDtrsmBatched (main.test_cublas)
ERROR: test_cublasDgetrfBatched (main.test_cublas)

Sam

from scikit-cuda.

lebedov avatar lebedov commented on May 22, 2024

If you run

import scikits.cuda.cublas
print scikits.cuda.cublas._cublas_version

in an interactive Python session, what do you observe?

from scikit-cuda.

samhumeau avatar samhumeau commented on May 22, 2024

I observe 5000 (???)

Sam

from scikit-cuda.

lebedov avatar lebedov commented on May 22, 2024

(The CUBLAS version number is slightly off because the mechanism for finding it looks at the soname major number of actual library file rather than calling cublasGetVersion(). I'll update this method to look at both the major and minor number. I don't believe this is related to your problem, though, because I also am running Ubuntu 14.04 with CUDA 5.5 and have not observed any problems.)

from scikit-cuda.

lebedov avatar lebedov commented on May 22, 2024

Can you try installing scikits.cuda in a virtualenv and running the CUBLAS tests with it? Here is how to do so:

sudo apt-get install python-virtualenv
cd ~/
unset PYTHONPATH
/usr/bin/virtualenv MYENV
./MYENV/bin/pip install -e git+https://github.com/lebedov/scikits.cuda#egg=scikits.cuda
./MYENV/bin/pip install mako
./MYENV/bin/pip install scipy
cd ./MYENV/src/scikits.cuda
~/MYENV/bin/python tests/test_cublas.py

from scikit-cuda.

benanne avatar benanne commented on May 22, 2024

Hey Samuel,

please note that you should no longer use the implementation I have on my GitHub account. This code has been integrated into Theano in the meantime, and it has been improved as well. So if you'd like to use this, just get the git version of Theano. You can enable it easily, have a look at the 'conv2d_fft' docs here: http://deeplearning.net/software/theano/library/tensor/nnet/conv.html

That said, with the Theano version you will probably run into the same issue (it also uses cublasCgemmBatched).

from scikit-cuda.

samhumeau avatar samhumeau commented on May 22, 2024

Hey
@ Sander Dieleman I actually directly the theano version of your code. I said "the code of Sander Dieleman" because I have known it via your blog.

@lebedov. OK, so in the virtual env I do not have the error for cublasCgemmBatched (even if there are two errors):

...........................E...........................E
ERROR: test_cublasSgetrfBatched (main.test_cublas)

Traceback (most recent call last):
File "tests/test_cublas.py", line 632, in test_cublasSgetrfBatched
from scipy.linalg import lu_factor
ImportError: No module named scipy.linalg

ERROR: test_cublasDgetrfBatched (main.test_cublas)
Traceback (most recent call last):
File "tests/test_cublas.py", line 652, in test_cublasDgetrfBatched
from scipy.linalg import lu_factor
ImportError: No module named scipy.linalg


Ran 56 tests in 9.809s

I guess this simply has something to do with some things that I would have installed. I will try very soon to make my code that uses theano in a virtual env, it would be an acceptable solution.

Sam

from scikit-cuda.

lebedov avatar lebedov commented on May 22, 2024

The two errors you observed are caused by scipy not being found. Can you successfully import scipy using the python instance in the virtualenv?

from scikit-cuda.

benanne avatar benanne commented on May 22, 2024

Ohh I see, alright. Hope you can figure out what's going on!

from scikit-cuda.

samhumeau avatar samhumeau commented on May 22, 2024

ok, so now everything is working fine on the virtual environment (scipy re-installed), the tests return 0 errors and I have a way to enjoy the amazing faster convolutions offered by the code of benanne.

On the main installation of python, however, I still have this problem, which I can't explain. But since I have a way to make it work (and that it is not really fun to dig into this kind of problems), I think I will let it go like this.

So thanks you guys for your advices and your awesome libraries.

Sam

from scikit-cuda.

lebedov avatar lebedov commented on May 22, 2024

Glad you got it to work!

from scikit-cuda.

francisquintallauzon avatar francisquintallauzon commented on May 22, 2024

I had the same problem today. What made the trick was simply to install the development version (0.5.0 as of today) after installing the pypi version. For those unfamiliar with pip simply run: sudo pip install --upgrade --no-deps git+https://github.com/lebedov/scikits.cuda.git

from scikit-cuda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.