Open artur-ag opened 6 days ago
Hi @artur-ag, I implemented clip.cpp back in the days when Convolution on CUDA was limited in GGML. Then, I implemented Cuda support for multimodal inference in llama.cpp, but I didn't backported it to clip.cpp. I've just started working on llama.cpp-related projects again and one goal is also to modernize clip.cpp soon (I hope to announce new tools and libraries in one week or so, and modernized clip.cpp will follow them).
Got it, thank you for the fast reply, and thank you for clip.cpp!
I compiled ggml with
-DGGML_CUBLAS=ON
and then clip.cpp, and used it to get text encodings, but the GPU is not being used. The code takes the same amount of time as it did with CPU-only. Is this expected? Doesclip_text_encode
always use the CPU no matter what? Or did I forget to do something?Details: ggml is detecting the GPU without problem (Nvidia AGX Orin):
Simplified version of my code:
This takes 8 seconds to finish. While this runs, I have jtop open, and I see the GPU is only active during the first 3 seconds, when ggml gets the GPU name and compute capability to print them. After that, the GPU goes offline. GPU usage is always 0%.