Skip to content

GPU SUPPORT SOLUTION #126

@hlia981

Description

@hlia981

For who interested in using GPU for faster Whisper inference

The whisper.cpp project offers a solution for GPU-accelerated Whisper inference. Follow these steps to configure your build:

  • Simply modify build_whisper.cmd:
    Locate line 55 in the build_whisper.cmd file and replace it with the following:

    cmake .. -DBUILD_SHARED_LIBS=OFF -DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_SERVER=ON -DGGML_CUDA=1

    This modification enables CUDA support during the build process.

  • Clean Rebuild Requirement:
    If you have previously compiled whisper.cpp for CPU inference, a clean rebuild is essential for GPU integration. Simply running .\build_whisper.cmd on an existing folder will not suffice.
    Recommendation: Create a new directory, git clone meetily into this new folder, and then execute the build script. This ensures all necessary components are compiled with GPU support from scratch.

Note:

If you encounter errors related to CMake and CUDA during the build process, consider the following:

  • CUDA Toolkit Installation:
    Verify that the CUDA Toolkit is correctly downloaded and installed on your system. This toolkit provides the necessary libraries and tools for CUDA development.

  • Troubleshooting CMake Errors:
    If errors persist, refer to this Stack Overflow post. Copy and paste those four files to visual studio folder


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions