You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using whisper.cpp version 1.7.5 in an environment with multiple GPUs, specifying a gpu_device other than 0 causes an assertion failure and termination.
This occurs in make_buft_list, which creates a list of device-buffer pairs.
There's an issue in the code that attempts to use GPU 0 when the specified gpu_device is greater than 0 and that specific GPU is not present in the environment.
For example, in an environment with two GPUs, if gpu_device == 1 is set, make_buft_list incorrectly registers device-buffer pairs for both GPU 0 and GPU 1.
While the device selection correctly chooses GPU 1, the buffer selection process only checks the device type and the buffer's device type, without considering the actual device ID.
Consequently, it selects the buffer associated with GPU 0, which is the first entry in the buffer list.
This mismatch between the execution device (GPU 1) and the buffer's device (GPU 0) leads to the assertion failure.
Although it's a very crude hack, inserting the following code starting at line 1406 in whisper.cpp, right after the GPU loop finishes, allows the program to work correctly:
if (buft_list.size() >1)
{
buft_list.erase(buft_list.begin());
}
This code forcibly removes the entry for GPU 0 from buft_list if both the GPU 0 entry and the specified GPU entry exist.
The text was updated successfully, but these errors were encountered:
When using whisper.cpp version 1.7.5 in an environment with multiple GPUs, specifying a
gpu_device
other than 0 causes an assertion failure and termination.This occurs in
make_buft_list
, which creates a list of device-buffer pairs.There's an issue in the code that attempts to use GPU 0 when the specified
gpu_device
is greater than 0 and that specific GPU is not present in the environment.For example, in an environment with two GPUs, if
gpu_device == 1
is set, make_buft_list incorrectly registers device-buffer pairs for both GPU 0 and GPU 1.While the device selection correctly chooses GPU 1, the buffer selection process only checks the device type and the buffer's device type, without considering the actual device ID.
Consequently, it selects the buffer associated with GPU 0, which is the first entry in the buffer list.
This mismatch between the execution device (GPU 1) and the buffer's device (GPU 0) leads to the assertion failure.
Although it's a very crude hack, inserting the following code starting at line 1406 in
whisper.cpp
, right after the GPU loop finishes, allows the program to work correctly:This code forcibly removes the entry for GPU 0 from
buft_list
if both the GPU 0 entry and the specified GPU entry exist.The text was updated successfully, but these errors were encountered: