McCloudS / subgen

Autogenerate subtitles using OpenAI Whisper Model via Jellyfin, Plex, Emby, Tautulli, or Bazarr
MIT License
453 stars 45 forks source link

Cuda error: no kernel image is available for execution on the device #82

Closed xhzhu0628 closed 3 months ago

xhzhu0628 commented 3 months ago

recently I've been running CUDA programs in Docker on Unraid. I have successfully installed the NVIDIA driver in Unraid and confirmed the GPU version and CUDA version (12.4) using the nvidia-smi command within Docker.

I'm using NVIDIA QUADRO K2200, CUDA 12.4

However, I'm still encountering an error when running the program: "no kernel image is available for execution on the device."

What could be the possible reasons for this, and how can I resolve it?

McCloudS commented 3 months ago

How are you set up? The docker container shouldn't let you run 12.4. Subgen (which uses: Whisper, CTranslate2, and Stable-ts) won't work on 12.4, which is why you get that issue. I am also running unraid.

nvidia-smi on the current subgen docker shows (just re-pulled it this morning): image

xhzhu0628 commented 3 months ago
屏幕截图 2024-04-14 221423 屏幕截图 2

I just installed the NVIDIA Driver plugin yesterday. Here are screenshots of the version in the Unraid plugin and the nvidia-smi output in Docker.

xhzhu0628 commented 3 months ago

How are you set up? The docker container shouldn't let you run 12.4. Subgen (which uses: Whisper, CTranslate2, and Stable-ts) won't work on 12.4, which is why you get that issue. I am also running unraid.

nvidia-smi on the current subgen docker shows (just re-pulled it this morning): image

it seems that I should use v545.29.06 instead

McCloudS commented 3 months ago

Yeah, try downgrading versions. Odd that my unraid doesn’t show your version, it shows me on the newest.

xhzhu0628 commented 3 months ago

image I downgraded the NVIDIA driver version, but the same error still occurs. Maybe related to cuda compute capability? I have no idea about it.

McCloudS commented 3 months ago

Per https://opennmt.net/CTranslate2/hardware_support.html: “NVIDIA GPUs with a Compute Capability greater or equal to 3.5” for CTranslate2 but the K2200 has 5.0. I’m not sure…

xhzhu0628 commented 3 months ago

Ah, I think you’re right. Per https://opennmt.net/CTranslate2/hardware_support.html: “NVIDIA GPUs with a Compute Capability greater or equal to 3.5” for CTranslate2 and the K2200 has 3.0. I don’t think this will work for you.

Sorry.

https://developer.nvidia.com/cuda-gpus According to datasheet nvidia given, K2200 has 5.0 Compute Capability. But it's weird compared to other similar-level cards... I will change it and try again...

McCloudS commented 3 months ago

Yeah, I saw one nvidia document that said 3.0, but their official cuda page says 5. Looks like this is a similar issue to https://github.com/ollama/ollama/issues/1756

I’m still reading it.

McCloudS commented 3 months ago

I’m finding conflicting stuff showing that compute 5.0/Maxwell was kind of left behind. CTranslate2 doesn’t appear to build it for cuda12.

McCloudS commented 3 months ago

Asked around and see: https://github.com/OpenNMT/CTranslate2/issues/1666#issuecomment-2058390754

Compute 5.0 doesn't support CUDA 12, which CTranslate2 uses.

Sorry.