Skip to content
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

CUDA support from Windows #62

Open
robante15 opened this issue Sep 22, 2024 · 5 comments
Open

CUDA support from Windows #62

robante15 opened this issue Sep 22, 2024 · 5 comments

Comments

@robante15
Copy link

How can I install pywhispercpp with CUDA support from Windows?
Adding the environment variable WHISPER_CUDA=1 does not cause any changes in the compilation

@abdeladim-s
Copy link
Owner

Can you try with GGML_CUDA=1 instead ?

@robante15
Copy link
Author

In this case it does compile, and it does generate the DLL
But when I run it I get the following error:

PS E:\Github\TG_WhisperCpp> & e:/Github/TG_WhisperCpp/.venv/Scripts/python.exe e:/Github/TG_WhisperCpp/main.py
Traceback (most recent call last):
  File "e:\Github\TG_WhisperCpp\main.py", line 4, in <module>
    import pywhisp
  File "e:\Github\TG_WhisperCpp\pywhisp.py", line 1, in <module>
    from pywhispercpp.model import Model
  File "E:\Github\TG_WhisperCpp\.venv\lib\site-packages\pywhispercpp\__init__.py", line 14, in <module>
    ctypes.CDLL(os.path.join(os.path.dirname(__file__), 'lib', file))
  File "C:\Users\Roberto Acevedo\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'E:\Github\TG_WhisperCpp\.venv\lib\site-packages\pywhispercpp\lib\ggml.dll' (or one of its dependencies). Try using the full path with constructor syntax.

@abdeladim-s
Copy link
Owner

Could you please check what's inside the lib folder E:\Github\TG_WhisperCpp\.venv\lib\site-packages\pywhispercpp\lib\ ? and whether the ggml.dll file is there ?

@robante15
Copy link
Author

Inside the folder E:\Github\TG_WhisperCpp\.venv\Lib\site-packages\pywhispercpp\lib there are three files

_pywhispercpp.cp310-win_amd64.pyd
ggml.dll
whisper.dll

@abdeladim-s
Copy link
Owner

It seems good to me! the ggml.dll file is there! Idk why it's complaining about not finding it!

Are you able to compile and run whisper.cpp with cuda support ?

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

No branches or pull requests

2 participants