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

Whisper doesn't use GPU even enabled CUDA #103

Open
ThanhVux011 opened this issue Oct 28, 2024 · 6 comments
Open

Whisper doesn't use GPU even enabled CUDA #103

ThanhVux011 opened this issue Oct 28, 2024 · 6 comments
Labels
question Further information is requested

Comments

@ThanhVux011
Copy link

The sample runs very fast and uses the GPU, while my project consumes a lot of CPU even though I have enabled CUDA in the settings.
I installed CUDE toolkit 12.2.0 and my unity version is 2022.3.47f1 , i tried to reinstall whisper and CUDA but none of them work

@Macoron
Copy link
Owner

Macoron commented Oct 28, 2024

For wich platform is targeted your project in Project Settings? Have you tried testing it in the build? What GPU do you have?

@Macoron Macoron added the question Further information is requested label Oct 28, 2024
@ThanhVux011
Copy link
Author

My project target platform is PC , i build both my project and your sample and the result is still the same , i'm using RTX 4070

@Macoron
Copy link
Owner

Macoron commented Oct 29, 2024

Can you double check that in the Project Settings/Player/Scripting Define Symbols you have WHISPER_CUDA define? I checked on my PC, and I usually get clear 10x-15x speed up with enabled CUDA.

@MauritsDijkman
Copy link

MauritsDijkman commented Nov 11, 2024

Hey ThanhVux011, did you manage to make it work? I have the same issue on my end (also when trying it in the demo project). The 'WHISPER_CUDA' is defined in the Scripting Define Symbols.

I get the following error when trying to use CUDA: "DllNotFoundException: libwhisper_cuda assembly: type: member:(null)"

@Macoron
Copy link
Owner

Macoron commented Nov 11, 2024

@MauritsDijkman are you getting slow transcription or you don't get any results (only error)?

@MauritsDijkman
Copy link

@MauritsDijkman are you getting slow transcription or you don't get any results (only error)?

Hey Macoron, thank you for the fast reply! I only get the error when going into playmode and it tries to load the Whisper model. It doesn't allow for transcription at that point.
Is there a setting or value that I should perhaps change?

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

No branches or pull requests

3 participants