Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Proposed fix on finding CUBLAS lib on Windows. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AngeloCiffa
Copy link

Hello,

I have found an issue running CUBLAS on windows using your lib. The file libcuda is called cublas64_75. It requires the user to have CUDA 7.5 installed.

We should find a way to abstract the version in the name of the dll.

Hope that helps,

Hello,

I have found an issue running CUBLAS on windows using your lib. The file libcuda is called cublas64_75. It requires the user to have CUDA 7.5 installed. 

We should find a way to abstract the version in the name of the dll.

Hope that helps,
@AngeloCiffa
Copy link
Author

Found this piece of code in a python lib scikit-cuda
(https://github.com/lebedov/scikit-cuda/blob/master/skcuda/cublas.py) Line 25 to 40

This is how they achieved getting the proper installed version of the cublas dll on Windows:

#   Load library:
 _version_list = [7.5, 7.0, 6.5, 6.0, 5.5, 5.0, 4.0]
 if 'linux' in sys.platform:
     _libcublas_libname_list = ['libcublas.so'] + \
                               ['libcublas.so.%s' % v for v in _version_list]
 elif sys.platform == 'darwin':
     _libcublas_libname_list = ['libcublas.dylib']
 elif sys.platform == 'win32':
   if sys.maxsize > 2**32:
        _libcublas_libname_list = ['cublas.dll'] + \
                                  ['cublas64_%s.dll' % int(10*v) for v in _version_list]
     else:
         _libcublas_libname_list = ['cublas.dll'] + \
                                   ['cublas32_%s.dll' % int(10*v) for v in _version_list]
 else:
     raise RuntimeError('unsupported platform')

Hope that helps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant