Closed petterthowsen closed 1 month ago
Don't have linux to debug/test this. Looks like the libgodot_whisper.linux.template_release.x86_64.so binary exists, but probably at link stage something went wrong as it doesn't see clBuildProgram.
Normally it should all be built, however it seems like for linux the build is failing(but since for linux symbol resolution is done at runtime it doesnt show any error).
Here is how we build and link OpenCL:
https://github.com/V-Sekai/godot-whisper/blob/main/.github/workflows/build_linux.yml
Currently we clone OpenCL repo, build it and then maybe our build doesnt take that lib? not 100% sure, will have to investigate though.
@fire can you also take a look if you get some time?
Ok. I'm not very familiar with C++ so this is greek for me. I'll patiently wait for someone to chime in!
Can you check if opencl drivers are installed?
Like sudo apt install opencl-headers ocl-icd-opencl-dev -y
.
Also what linux and what hardware.
@fire Linux Mint 21.3 x86_64 Host: ASUS TUF Gaming A17 FA707NV_FA707NV 1.0 Kernel: 6.5.0-14-generic CPU: AMD Ryzen 5 7535HS with Radeon Graphics (12) @ 4.603GHz GPU: AMD ATI 35:00.0 Rembrandt GPU: NVIDIA 01:00.0 NVIDIA Corporation Device 28e0
ocl-icd-opencl-dev is already the newest version (2.2.14-3). opencl-headers is already the newest version (3.0~2022.01.04-1).
I have no idea but maybe it's confused trying to use opencl on amd vs opencl on nvidia.
Hi, I'm also getting this same issue on Ubuntu 22.04 LTS with an AMD RX 6700XT GPU and Ryzen 5 5600X CPU.
I compiled the addon myself and made sure I had all the opencl apt packages installed as mentioned above just to see if that would make a difference but I got the same issue.
I'm not familiar with C++ all too much but I'll ask around and see if I can figure something out with this, and I'll report back if I find out a way to solve this.
Are you able to run whisper.cpp locally on ubuntu? That might be a good start point to see how they run it.
I was able to get the basic transcription example working compiling the base whisper.cpp with the below command. It appears to be using the GPU just fine as far as I can tell.
# build the main example
make
# transcribe an audio file
./main -f samples/jfk.wav
Interesting. I wonder what kind of opencl the make is uaing for linux. Ill check also.
I did some digging myself, and this is probably because the gdextension doesn't link with OpenCL itself. If you force OpenCL to load using LD_PRELOAD, it gets a bit further but fails because it can't find "SET_CPU_S" (which is odd, since that's typically a macro).
Looking into it further, it looks like we need to define _GNU_SOURCE (https://github.com/ggerganov/whisper.cpp/blob/22fcd5fd110ba1ff592b4e23013d870831756259/ggml/src/CMakeLists.txt#L1236) to have ggml pick up the right functions at build time.
I just downloaded this plugin via asset library and getting these errors:
I'm on Linux.
Do I need to build this project or something?