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

Add CUDA support for Windows #61

Merged
merged 11 commits into from
Nov 21, 2023
Merged

Add CUDA support for Windows #61

merged 11 commits into from
Nov 21, 2023

Conversation

Macoron
Copy link
Owner

@Macoron Macoron commented Nov 20, 2023

Fixes #31.

Now you can switch between CPU inference and CUDA inference. To run CUDA inference, you need supported card and installed CUDA Toolkit (tested with 12.2.0). To activate CUDA inference go to Project Settings => Whisper => Enable CUDA.

whisper.cpp will not fallback to CPU in your Editor/Build. If you want to distribute your CUDA build make sure to force user install CUDA Toolkit or distribute CUDA dlls by yourself.

This PR changes build_cpp.bat file and add new Github Action to build whisper.cpp with CUDA.

Also:

  • Ported whisper_init_from_file_with_params and whisper_init_from_buffer_with_params. Previous methods were marked deprecated.
  • Ported whisper_print_system_info to get human readable information about compiled whisper libraries. Helps to check if libs were compiled with AVX, CUDA flag, etc. Unfortunately, it doesn't check actual hardware capacity.

@Macoron Macoron merged commit 38c24cd into master Nov 21, 2023
1 check passed
@Macoron Macoron deleted the gpu-tests branch November 21, 2023 20:57
github-actions bot pushed a commit to GameWorkstore/whisper.unity that referenced this pull request Apr 2, 2024
* Add support for params context

* Add system info print function

* Changed script to build CUDA

* Update build_cpp.yml

* Update build_cpp.yml

* Update build_cpp.yml

* Added cuda dll

* Minor changes

* Fix older unity

* And this

* Update README.md
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

Successfully merging this pull request may close these issues.

CUDA support
1 participant